aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ext4/fast_commit.c
diff options
context:
space:
mode:
authorAndrĂ© Almeida <[email protected]>2024-11-01 16:42:50 +0000
committerChristian Brauner <[email protected]>2024-11-06 10:22:20 +0000
commit18d2f10f6284f5bb9c03a759044121c71e5b3b4c (patch)
treeaefc2de0be279347a9f1d6c4054ff398cd06dd21 /fs/ext4/fast_commit.c
parentlibfs: Fix kernel-doc warning in generic_ci_validate_strict_name (diff)
downloadkernel-18d2f10f6284f5bb9c03a759044121c71e5b3b4c.tar.gz
kernel-18d2f10f6284f5bb9c03a759044121c71e5b3b4c.zip
tmpfs: Fix type for sysfs' casefold attribute
DEVICE_STRING_ATTR_RO should be only used by device drivers since it relies on `struct device` to use device_show_string() function. Using this with non device code led to a kCFI violation: > cat /sys/fs/tmpfs/features/casefold [ 70.558496] CFI failure at kobj_attr_show+0x2c/0x4c (target: device_show_string+0x0/0x38; expected type: 0xc527b809) Like the other filesystems, fix this by manually declaring the attribute using kobj_attribute() and writing a proper show() function. Also, leave macros for anyone that need to expand tmpfs sysfs' with more attributes. Fixes: 5132f08bd332 ("tmpfs: Expose filesystem features via sysfs") Reported-by: Nathan Chancellor <[email protected]> Closes: https://lore.kernel.org/lkml/20241031051822.GA2947788@thelio-3990X/ Signed-off-by: AndrĂ© Almeida <[email protected]> Link: https://lore.kernel.org/r/[email protected] Tested-by: Nathan Chancellor <[email protected]> Reviewed-by: Nathan Chancellor <[email protected]> Signed-off-by: Christian Brauner <[email protected]>
Diffstat (limited to 'fs/ext4/fast_commit.c')
0 files changed, 0 insertions, 0 deletions