]> git.baikalelectronics.ru Git - kernel.git/commit
block: don't use blocking queue entered for recursive bio submits
authorJens Axboe <axboe@kernel.dk>
Sat, 2 Jun 2018 20:04:07 +0000 (14:04 -0600)
committerJens Axboe <axboe@kernel.dk>
Sun, 3 Jun 2018 02:35:00 +0000 (20:35 -0600)
commit02a33a25951154d9aab3ecbed698abb835acdff2
tree7991620de08c70556b880e5fc4917382d48e477d
parent8eb842ea8857990613a425e700fb5f806f69166e
block: don't use blocking queue entered for recursive bio submits

If we end up splitting a bio and the queue goes away between
the initial submission and the later split submission, then we
can block forever in blk_queue_enter() waiting for the reference
to drop to zero. This will never happen, since we already hold
a reference.

Mark a split bio as already having entered the queue, so we can
just use the live non-blocking queue enter variant.

Thanks to Tetsuo Handa for the analysis.

Reported-by: syzbot+c4f9cebf9d651f6e54de@syzkaller.appspotmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/blk-core.c
block/blk-merge.c
include/linux/blk_types.h