[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1477336405-28442-1-git-send-email-linville@tuxdriver.com>
Date: Mon, 24 Oct 2016 15:13:25 -0400
From: "John W. Linville" <linville@...driver.com>
To: nbd-general@...ts.sourceforge.net
Cc: linux-kernel@...r.kernel.org,
"John W. Linville" <linville@...driver.com>,
Josef Bacik <jbacik@...com>, Jens Axboe <axboe@...com>,
Markus Pargmann <mpa@...gutronix.de>
Subject: [PATCH] nbd: fix incorrect unlock of nbd->sock_lock in sock_shutdown
Commit 0eadf37afc250 ("nbd: allow block mq to deal with timeouts")
changed normal usage of nbd->sock_lock to use spin_lock/spin_unlock
rather than the *_irq variants, but it missed this unlock in an
error path.
Found by Coverity, CID 1373871.
Signed-off-by: John W. Linville <linville@...driver.com>
Cc: Josef Bacik <jbacik@...com>
Cc: Jens Axboe <axboe@...com>
Cc: Markus Pargmann <mpa@...gutronix.de>
Fixes: 0eadf37afc250 ("nbd: allow block mq to deal with timeouts")
---
By inspection (i.e. compile tested only)...
drivers/block/nbd.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/block/nbd.c b/drivers/block/nbd.c
index ba405b55329f..19a16b2dbb91 100644
--- a/drivers/block/nbd.c
+++ b/drivers/block/nbd.c
@@ -164,7 +164,7 @@ static void sock_shutdown(struct nbd_device *nbd)
spin_lock(&nbd->sock_lock);
if (!nbd->sock) {
- spin_unlock_irq(&nbd->sock_lock);
+ spin_unlock(&nbd->sock_lock);
return;
}
--
2.7.4
Powered by blists - more mailing lists