[PATCH] nvmet: replace sysfs_emit() with sprintf() in configfs show attrs
Greg Kroah-Hartman
gregkh at linuxfoundation.org
Fri Jun 26 00:53:03 PDT 2026
On Fri, Jun 26, 2026 at 09:01:17AM +0200, Christoph Hellwig wrote:
>
> Adding Greg to see if he agrees.
Ick, no, sysfs_emit() should be just fine, and safe, for configfs to
use, please don't do conversions away from it.
> But if we add churn to change this, we should probably switch to
> using seq_file for memory safety, and have some generic
> configfs-level infrastruture for that.
seq_file() would also be great, but really, sysfs_emit() should be all
that you need to use here as you should only have one-value-per-file
with no overflows possible anyway.
thanks,
greg k-h
More information about the Linux-nvme
mailing list