Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1507642
| Path | csiph.com!news.mixmin.net!aioe.org!bofh.it!news.nic.it!robomod |
|---|---|
| From | "John W. Linville" <linville@tuxdriver.com> |
| Newsgroups | linux.kernel |
| Subject | [PATCH] nbd: fix incorrect unlock of nbd->sock_lock in sock_shutdown |
| Date | Mon, 24 Oct 2016 21:20:01 +0200 |
| Message-ID | <svSWR-3rd-15@gated-at.bofh.it> (permalink) |
| X-Original-To | nbd-general@lists.sourceforge.net |
| X-Mailer | git-send-email 2.7.4 |
| Sender | robomod@news.nic.it |
| List-ID | <linux-kernel.vger.kernel.org> |
| X-Mailing-List | linux-kernel@vger.kernel.org |
| Approved | robomod@news.nic.it |
| Lines | 33 |
| Organization | linux.* mail to news gateway |
| X-Original-Cc | linux-kernel@vger.kernel.org, "John W. Linville" <linville@tuxdriver.com>, Josef Bacik <jbacik@fb.com>, Jens Axboe <axboe@fb.com>, Markus Pargmann <mpa@pengutronix.de> |
| X-Original-Date | Mon, 24 Oct 2016 15:13:25 -0400 |
| X-Original-Message-ID | <1477336405-28442-1-git-send-email-linville@tuxdriver.com> |
| X-Original-Sender | linux-kernel-owner@vger.kernel.org |
| Xref | csiph.com linux.kernel:1507642 |
Show key headers only | View raw
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@tuxdriver.com>
Cc: Josef Bacik <jbacik@fb.com>
Cc: Jens Axboe <axboe@fb.com>
Cc: Markus Pargmann <mpa@pengutronix.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
Back to linux.kernel | Previous | Next | Find similar | Unroll thread
[PATCH] nbd: fix incorrect unlock of nbd->sock_lock in sock_shutdown "John W. Linville" <linville@tuxdriver.com> - 2016-10-24 21:20 +0200
csiph-web