]> Git Repo - linux.git/commit - drivers/block/loop.c
loopdev: remove an user triggerable oops
authorGuo Chao <[email protected]>
Thu, 21 Feb 2013 23:16:49 +0000 (15:16 -0800)
committerJens Axboe <[email protected]>
Fri, 22 Feb 2013 09:43:22 +0000 (10:43 +0100)
commitb1a6650406875b9097a032eed89af50682fe1160
tree2521139daec844942ca85e30c86c0218cc8f7a52
parent7b0576a3d835b4d46ed85d817ce016e90bf293a3
loopdev: remove an user triggerable oops

When loopdev is built as module and we pass an invalid parameter,
loop_init() will return directly without deregister misc device, which
will cause an oops when insert loop module next time because we left some
garbage in the misc device list.

Test case:
sudo modprobe loop max_part=1024
(failed due to invalid parameter)
sudo modprobe loop
(oops)

Clean up nicely to avoid such oops.

Signed-off-by: Guo Chao <[email protected]>
Cc: Alexander Viro <[email protected]>
Cc: Guo Chao <[email protected]>
Cc: M. Hindess <[email protected]>
Cc: Nikanth Karthikesan <[email protected]>
Cc: Jens Axboe <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Jens Axboe <[email protected]>
drivers/block/loop.c
This page took 0.055001 seconds and 4 git commands to generate.