lkml.org 
[lkml]   [2021]   [Jul]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] PCI: endpoint: Use sysfs_emit() in "show" functions
Hello Hayashi-san,

Thank you for sending the patch over!

> Convert sprintf() in sysfs "show" functions to sysfs_emit() in order to
> check for buffer overruns in sysfs outputs.

Nice catch!

A small nitpick: what you are changing here are technically not sysfs
objects since all of these are related to configfs. Having said that,
configfs shares the same semantics for normal attributes with sysfs, so
a maximum size of PAGE_SIZE applies here too, and thus sysfs_emit()
would work fine.

Thank you for taking care of this!

Reviewed-by: Krzysztof Wilczyński <kw@linux.com>

Krzysztof

\
 
 \ /
  Last update: 2021-07-19 05:44    [W:0.174 / U:0.352 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site