diff options
author | Paul Clements <paul.clements@steeleye.com> | 2012-09-17 21:09:02 (GMT) |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-09-17 22:00:37 (GMT) |
commit | fded4e090c60100d709318896c79816d68d5b47d (patch) | |
tree | 889cd9547a487296b5354b1956e174b4750a2737 /mm | |
parent | e9b7d7c81d9bdb41a897a2983ae3386a5fd4a1e3 (diff) | |
download | linux-fded4e090c60100d709318896c79816d68d5b47d.tar.xz |
nbd: clear waiting_queue on shutdown
Fix a serious but uncommon bug in nbd which occurs when there is heavy
I/O going to the nbd device while, at the same time, a failure (server,
network) or manual disconnect of the nbd connection occurs.
There is a small window between the time that the nbd_thread is stopped
and the socket is shutdown where requests can continue to be queued to
nbd's internal waiting_queue. When this happens, those requests are
never completed or freed.
The fix is to clear the waiting_queue on shutdown of the nbd device, in
the same way that the nbd request queue (queue_head) is already being
cleared.
Signed-off-by: Paul Clements <paul.clements@steeleye.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm')
0 files changed, 0 insertions, 0 deletions