Staging
v0.5.1
https://github.com/torvalds/linux
Revision bc1c116974a5c3f498112a6f175d3e4a8cd5bdbc authored by Jens Axboe on 08 June 2006, 06:49:06 UTC, committed by Linus Torvalds on 08 June 2006, 22:14:23 UTC
There's a race between shutting down one io scheduler and firing up the
next, in which a new io could enter and cause the io scheduler to be
invoked with bad or NULL data.

To fix this, we need to maintain the queue lock for a bit longer.
Unfortunately we cannot do that, since the elevator init requires to be
run without the lock held.  This isn't easily fixable, without also
changing the mempool API.  So split the initialization into two parts,
and alloc-init operation and an attach operation.  Then we can
preallocate the io scheduler and related structures, and run the attach
inside the lock after we detach the old one.

This patch has survived 30 minutes of 1 second io scheduler switching
with a very busy io load.

Signed-off-by: Jens Axboe <axboe@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
1 parent 26e780e
History
Tip revision: bc1c116974a5c3f498112a6f175d3e4a8cd5bdbc authored by Jens Axboe on 08 June 2006, 06:49:06 UTC
[PATCH] elevator switching race
Tip revision: bc1c116
File Mode Size
Documentation
arch
block
crypto
drivers
fs
include
init
ipc
kernel
lib
mm
net
scripts
security
sound
usr
.gitignore -rw-r--r-- 462 bytes
COPYING -rw-r--r-- 18.3 KB
CREDITS -rw-r--r-- 87.4 KB
Kbuild -rw-r--r-- 1.2 KB
MAINTAINERS -rw-r--r-- 68.9 KB
Makefile -rw-r--r-- 43.7 KB
README -rw-r--r-- 16.2 KB
REPORTING-BUGS -rw-r--r-- 3.0 KB

README

back to top