Re: [PATCH] ata: libata-transport: replace scnprintf with sysfs_emit for simple attributes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


(追記) (追記ここまで)



On 7/7/25 9:20 PM, Jonathan Velez wrote:
> sprintf, snprintf, and scnprintf do not consider the PAGE_SIZE maximum
> of the temporary buffer used for outputting sysfs content and they may
> overrun the PAGE_SIZE buffer length.
>
> To avoid output defects with the ATA transport class simple attributes,
> scnprintf() was converted to sysfs_emit(). This aligns with the sysfs
> guidance provided in Documentation/filesystems/sysfs.rst.
Nit: please use assertive style (no past tense/passive form)
To avoid output defects with the ATA transport class simple attributes,
use sysfs_emit instead of scnprintf().
>
> Signed-off-by: Jonathan Velez <jonvelez12345@xxxxxxxxx>
Otherwise, looks good.
Reviewed-by: Damien Le Moal <dlemoal@xxxxxxxxxx>
-- 
Damien Le Moal
Western Digital Research

[Index of Archives] [Linux Filesystems] [Linux SCSI] [Linux RAID] [Git] [Kernel Newbies] [Linux Newbie] [Security] [Netfilter] [Bugtraq] [Yosemite News] [MIPS Linux] [ARM Linux] [Linux Security] [Samba] [Device Mapper]

(追記) (追記ここまで)
Powered by Linux

AltStyle によって変換されたページ (->オリジナル) /