acrn-kernel/drivers/block
Damien Le Moal e1777d0997 null_blk: Fix scheduling in atomic with zoned mode
Commit aa1c09cb65 ("null_blk: Fix locking in zoned mode") changed
zone locking to using the potentially sleeping wait_on_bit_io()
function. This is acceptable when memory backing is enabled as the
device queue is in that case marked as blocking, but this triggers a
scheduling while in atomic context with memory backing disabled.

Fix this by relying solely on the device zone spinlock for zone
information protection without temporarily releasing this lock around
null_process_cmd() execution in null_zone_write(). This is OK to do
since when memory backing is disabled, command processing does not
block and the memory backing lock nullb->lock is unused. This solution
avoids the overhead of having to mark a zoned null_blk device queue as
blocking when memory backing is unused.

This patch also adds comments to the zone locking code to explain the
unusual locking scheme.

Fixes: aa1c09cb65 ("null_blk: Fix locking in zoned mode")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Damien Le Moal <damien.lemoal@wdc.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Cc: stable@vger.kernel.org
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2020-11-06 09:36:42 -07:00
..
aoe block: lift setting the readahead size into the block layer 2020-09-24 13:43:39 -06:00
drbd block-5.10-2020-10-12 2020-10-13 12:12:44 -07:00
mtip32xx
paride paride/pcd: use bdev_check_media_change 2020-09-10 09:32:31 -06:00
rnbd block/rnbd-clt: send_msg_close if any error occurs after send_msg_open 2020-10-13 15:05:05 -06:00
rsxx rsxx: Use fallthrough pseudo-keyword 2020-10-02 17:54:45 -06:00
xen-blkback xen-blkback: add a parameter for disabling of persistent grants 2020-10-21 07:15:13 -05:00
zram block-5.10-2020-10-24 2020-10-24 12:46:42 -07:00
Kconfig
Makefile
amiflop.c amiflop: use bdev_check_media_change 2020-09-10 09:32:30 -06:00
ataflop.c ataflop: use bdev_check_media_change 2020-09-10 09:32:30 -06:00
brd.c bdi: remove BDI_CAP_SYNCHRONOUS_IO 2020-09-24 13:43:39 -06:00
cryptoloop.c
floppy.c floppy: use bdev_check_media_change 2020-09-10 09:32:30 -06:00
loop.c
loop.h
nbd.c nbd: don't update block size after device is started 2020-10-29 07:25:43 -06:00
null_blk.h null_blk: Fix scheduling in atomic with zoned mode 2020-11-06 09:36:42 -07:00
null_blk_main.c null_blk: add support for max open/active zone limit for zoned devices 2020-09-29 08:12:48 -06:00
null_blk_trace.c
null_blk_trace.h
null_blk_zoned.c null_blk: Fix scheduling in atomic with zoned mode 2020-11-06 09:36:42 -07:00
pktcdvd.c pktcdvd: use blkdev_get_by_dev instead of open coding it 2020-09-23 10:43:19 -06:00
ps3disk.c
ps3vram.c
rbd.c We have: 2020-10-21 10:34:10 -07:00
rbd_types.h
skd_main.c skd_main: remove unused including <linux/version.h> 2020-10-17 08:11:14 -06:00
skd_s1120.h
sunvdc.c
swim.c swim: simplify media change handling 2020-09-10 09:32:30 -06:00
swim3.c swim3: use bdev_check_media_changed 2020-09-10 09:32:31 -06:00
swim_asm.S
sx8.c
umem.c
umem.h
virtio_blk.c block: add a new revalidate_disk_size helper 2020-09-02 08:00:07 -06:00
xen-blkfront.c xen-blkfront: add a parameter for disabling of persistent grants 2020-10-21 07:15:15 -05:00
xsysace.c xsysace: use platform_get_resource() and platform_get_irq_optional() 2020-10-29 08:22:33 -06:00
z2ram.c