linux/drivers/block
Chaitanya Kulkarni 860d36424d loop: use sysfs_emit() in the sysfs xxx show()
[ Upstream commit b27824d31f ]

sprintf does not know the PAGE_SIZE maximum of the temporary buffer
used for outputting sysfs content and it's possible to overrun the
PAGE_SIZE buffer length.

Use a generic sysfs_emit function that knows the size of the
temporary buffer and ensures that no overrun is done for offset
attribute in
loop_attr_[offset|sizelimit|autoclear|partscan|dio]_show() callbacks.

Signed-off-by: Chaitanya Kulkarni <kch@nvidia.com>
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com>
Link: https://lore.kernel.org/r/20220215213310.7264-2-kch@nvidia.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-04-08 14:23:55 +02:00
..
aoe
drbd drbd: fix potential silent data corruption 2022-04-08 14:22:57 +02:00
mtip32xx
null_blk
paride
rnbd
rsxx
xen-blkback
zram
amiflop.c block: drop unused includes in <linux/genhd.h> 2022-03-16 14:23:46 +01:00
ataflop.c block: drop unused includes in <linux/genhd.h> 2022-03-16 14:23:46 +01:00
brd.c
cryptoloop.c
floppy.c block: drop unused includes in <linux/genhd.h> 2022-03-16 14:23:46 +01:00
Kconfig
loop.c loop: use sysfs_emit() in the sysfs xxx show() 2022-04-08 14:23:55 +02:00
loop.h
Makefile
n64cart.c
nbd.c
pktcdvd.c
ps3disk.c
ps3vram.c
rbd_types.h
rbd.c
sunvdc.c
swim_asm.S
swim.c block: drop unused includes in <linux/genhd.h> 2022-03-16 14:23:46 +01:00
swim3.c
sx8.c
virtio_blk.c virtio-blk: Use blk_validate_block_size() to validate block size 2022-04-08 14:22:48 +02:00
xen-blkfront.c block: drop unused includes in <linux/genhd.h> 2022-03-16 14:23:46 +01:00
z2ram.c