Skip to content
Commit 2ca7d93b authored by Nate Diller's avatar Nate Diller Committed by Linus Torvalds
Browse files

[PATCH] block cleanups: Fix iosched module refcount leak



If the requested I/O scheduler is already in place, elevator_switch simply
leaves the queue alone, and returns.  However, it forgets to call
elevator_put, so

'echo [current_sched] > /sys/block/[dev]/queue/scheduler'

will leak a reference, causing the current_sched module to be permanently
pinned in memory.

Signed-off-by: default avatarNate Diller <nate@namesys.com>
Acked-by: default avatarJens Axboe <axboe@suse.de>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 3fa63c7d
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment