summaryrefslogtreecommitdiff
path: root/fs/btrfs/dev-replace.c
diff options
context:
space:
mode:
authorOleg Nesterov <oleg@redhat.com>2019-07-04 15:14:49 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-07-10 09:52:29 +0200
commitd82bf47aa320a0df39df27e63e1e319c429b572e (patch)
tree6c5cac911efecdbadf0c13b2217b01152c39cdb1 /fs/btrfs/dev-replace.c
parent61ff807f0dd9e1daa3aa75ade32c102dedbcffd9 (diff)
swap_readpage(): avoid blk_wake_io_task() if !synchronous
commit 8751853091998cd31e9e5f1e8206280155af8921 upstream. 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/20190704160301.GA5956@redhat.com Fixes: 0619317ff8baa2d ("block: add polled wakeup task helper") Signed-off-by: Oleg Nesterov <oleg@redhat.com> Reported-by: Qian Cai <cai@lca.pw> Acked-by: Hugh Dickins <hughd@google.com> Reviewed-by: Jens Axboe <axboe@kernel.dk> Cc: <stable@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs/btrfs/dev-replace.c')
0 files changed, 0 insertions, 0 deletions