block: avoid infinite loop in get_task_io_context()
authorEric Dumazet <[email protected]>
Thu, 31 May 2012 11:39:05 +0000 (13:39 +0200)
committerJens Axboe <[email protected]>
Thu, 31 May 2012 11:39:05 +0000 (13:39 +0200)
commit3c9c708c9fc967e389f85bc735e4c1f65d67334e
tree946eeefd4599bb1adafd87ad8f46d52382935001
parentb77874c9699522540e65aa4291e37a7e43533bf3
block: avoid infinite loop in get_task_io_context()

Calling get_task_io_context() on a exiting task which isn't %current can
loop forever. This triggers at boot time on my dev machine.

BUG: soft lockup - CPU#3 stuck for 22s ! [mountall.1603]

Fix this by making create_task_io_context() returns -EBUSY in this case
to break the loop.

Signed-off-by: Eric Dumazet <[email protected]>
Cc: Tejun Heo <[email protected]>
Cc: Andrew Morton <[email protected]>
Cc: Alan Cox <[email protected]>
Signed-off-by: Jens Axboe <[email protected]>
block/blk-ioc.c