[PATCH] nvmet: replace sysfs_emit() with sprintf() in configfs show attrs

Guixin Liu kanie at linux.alibaba.com
Fri Jun 26 02:31:57 PDT 2026



在 2026/6/26 15:53, Greg Kroah-Hartman 写道:
> 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
Got it.

Best Regards,
Guixin Liu




More information about the Linux-nvme mailing list