FAILED: patch "[PATCH] nbd: stop leaking sockets" failed to apply to 4.10-stable tree
Subsystems (3)
[email protected]
maintainerThe patch below does not apply to the 4.10-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
Quoted 1 line
From
6a8a21546507a3ec88e81c2ec927a3fb63efa8ffMon Sep 17 00:00:00 2001
From: Josef Bacik <[email protected]>
Date: Wed, 1 Mar 2017 11:47:22 -0500
Subject: [PATCH] nbd: stop leaking sockets
This was introduced in the multi-connection patch, we've been leaking socket's ever since.
Fixes 9561a7a ("nbd: add multi-connection support")
Signed-off-by Josef Bacik <[email protected]>
Signed-off-by Jens Axboe <[email protected]>
drivers/block/nbd.c +3 -1
@@ -689,8 +689,10 @@ static int nbd_clear_sock(struct nbd_device *nbd, struct block_device *bdev) nbd->num_connections) {int i; -for (i =0 ; i < nbd->num_connections; i++) +for (i =0 ; i < nbd->num_connections; i++) { +sockfd_put (nbd->socks[i]->sock);kfree (nbd->socks[i]); + }kfree (nbd->socks); nbd->socks =NULL ; nbd->num_connections =0 ;