Searched hist:b27824d31f09ea7b4a6ba2c1b18bd328df3e8bed (Results 1 – 1 of 1) sorted by relevance
/openbmc/linux/drivers/block/ |
H A D | loop.c | diff b27824d31f09ea7b4a6ba2c1b18bd328df3e8bed Tue Feb 15 15:33:07 CST 2022 Chaitanya Kulkarni <kch@nvidia.com> loop: use sysfs_emit() in the sysfs xxx show()
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>
|