]> git.hungrycats.org Git - linux/commit
[PATCH] nbd: fix struct request race condition
authorPaul Clements <paul.clements@steeleye.com>
Mon, 23 Aug 2004 06:03:50 +0000 (23:03 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Mon, 23 Aug 2004 06:03:50 +0000 (23:03 -0700)
commitbc7e55089923f130eefe2955f1e150350a450933
tree1848e7f29199c7483490821b2e7df00f0bb28707
parent5a3d730ca9e9d61a5ad4f8c4faa2655fce41cbda
[PATCH] nbd: fix struct request race condition

Here's a patch to fix a race condition in nbd that was causing struct
request corruption (requests were being freed while still in use).  This
patch improves on the previous one, which admittedly was a bit dodgy, using
struct request's ref_count field (I should have listened to Jens in the
first place :).  This should fix all the corner cases related to struct
request usage/freeing in nbd.  My stress tests do a lot better with this
patch applied.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
drivers/block/nbd.c