]> git.baikalelectronics.ru Git - kernel.git/commit
block/rnbd: Use sysfs_emit instead of s*printf function for sysfs show
authorMd Haris Iqbal <haris.iqbal@ionos.com>
Mon, 26 Jul 2021 11:59:50 +0000 (13:59 +0200)
committerJens Axboe <axboe@kernel.dk>
Mon, 2 Aug 2021 19:37:40 +0000 (13:37 -0600)
commit3ba0b9ad29c459e13c1c95752b6b995b8fdb8a2e
treebcd7af3f9ddc0ea7d8f63b61092587dc582108cb
parent275fb87e4393b8068b0808ba99bc66ab845241dc
block/rnbd: Use sysfs_emit instead of s*printf function for sysfs show

sysfs_emit function was added to be aware of the PAGE_SIZE maximum of
the temporary buffer used for outputting sysfs content, so there is no
possible overruns. So replace the uses of any s*printf functions for
the sysfs show functions with sysfs_emit.

Signed-off-by: Md Haris Iqbal <haris.iqbal@ionos.com>
Signed-off-by: Jack Wang <jinpu.wang@ionos.com>
Link: https://lore.kernel.org/r/20210726115950.470543-3-jinpu.wang@ionos.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/block/rnbd/rnbd-clt-sysfs.c
drivers/block/rnbd/rnbd-srv-sysfs.c