Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
swap_readpage(): avoid blk_wake_io_task() if !synchronous
swap_readpage() sets waiter = bio->bi_private even if synchronous = F, this means that the caller can get the spurious wakeup after return. This can be fatal if blk_wake_io_task() does set_current_state(TASK_RUNNING) after the caller does set_special_state(), in the worst case the kernel can crash in do_task_dead(). Link: http://lkml.kernel.org/r/[email protected] Fixes: 0619317 ("block: add polled wakeup task helper") Signed-off-by: Oleg Nesterov <[email protected]> Reported-by: Qian Cai <[email protected]> Acked-by: Hugh Dickins <[email protected]> Reviewed-by: Jens Axboe <[email protected]> Cc: <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
- Loading branch information