arm64: perf: Convert snprintf to sysfs_emit
Use sysfs_emit instead of snprintf to avoid buf overrun,because in sysfs_emit it strictly checks whether buf is null or buf whether pagesize aligned, otherwise it returns an error. Signed-off-by: Tian Tao <tiantao6@hisilicon.com> Link: https://lore.kernel.org/r/1621497585-30887-1-git-send-email-tiantao6@hisilicon.comSigned-off-by: Will Deacon <will@kernel.org>
Showing
Please register or sign in to comment