]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
[PATCH] block cleanups: Fix iosched module refcount leak
authorNate Diller <nate@namesys.com>
Sun, 30 Oct 2005 23:02:24 +0000 (15:02 -0800)
committerLinus Torvalds <torvalds@g5.osdl.org>
Mon, 31 Oct 2005 01:37:20 +0000 (17:37 -0800)
commit2ca7d93bb27876e5fd4ebfcb3b00627107bdad4d
treedb3dbc868db28f9983ce99911ee7795042fba502
parent3fa63c7d82ab9a12a5d0a299069f8df9f35aa011
[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: Nate Diller <nate@namesys.com>
Acked-by: Jens Axboe <axboe@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
drivers/block/elevator.c