aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_zone_alloc.c
diff options
context:
space:
mode:
authorwangzijie <[email protected]>2025-09-04 13:57:15 +0000
committerAndrew Morton <[email protected]>2025-09-09 06:45:12 +0000
commit0ce9398aa0830f15f92bbed73853f9861c3e74ff (patch)
treeb5bdfd6c266b023108481ba8887ced2aeaf5f46f /fs/xfs/xfs_zone_alloc.c
parentcompiler-clang.h: define __SANITIZE_*__ macros only when undefined (diff)
downloadkernel-0ce9398aa0830f15f92bbed73853f9861c3e74ff.tar.gz
kernel-0ce9398aa0830f15f92bbed73853f9861c3e74ff.zip
proc: fix type confusion in pde_set_flags()
Commit 2ce3d282bd50 ("proc: fix missing pde_set_flags() for net proc files") missed a key part in the definition of proc_dir_entry: union { const struct proc_ops *proc_ops; const struct file_operations *proc_dir_ops; }; So dereference of ->proc_ops assumes it is a proc_ops structure results in type confusion and make NULL check for 'proc_ops' not work for proc dir. Add !S_ISDIR(dp->mode) test before calling pde_set_flags() to fix it. Link: https://lkml.kernel.org/r/[email protected] Fixes: 2ce3d282bd50 ("proc: fix missing pde_set_flags() for net proc files") Signed-off-by: wangzijie <[email protected]> Reported-by: Brad Spengler <[email protected]> Closes: https://lore.kernel.org/all/[email protected]/ Cc: Alexey Dobriyan <[email protected]> Cc: Al Viro <[email protected]> Cc: Christian Brauner <[email protected]> Cc: Jiri Slaby <[email protected]> Cc: Stefano Brivio <[email protected]> Cc: <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
Diffstat (limited to 'fs/xfs/xfs_zone_alloc.c')
0 files changed, 0 insertions, 0 deletions