Commit 5edbc204 authored by Steven Rostedt (Google)'s avatar Steven Rostedt (Google) Committed by Zheng Zengkai
Browse files

eventfs: Check for NULL ef in eventfs_set_attr()

stable inclusion
from stable-v6.6.2
commit d8f492a059728bbd397defbc9b8d2f4159d869b5
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I8IW7G

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=d8f492a059728bbd397defbc9b8d2f4159d869b5

--------------------------------

The top level events directory dentry does not have a d_fsdata set to a
eventfs_file pointer. This dentry is still passed to eventfs_set_attr().
It can not assume that the d_fsdata is set. Check for that.

Link: https://lore.kernel.org/all/20231112104158.6638-1-milian.wolff@kdab.com/



Fixes: 9aaee3eebc91 ("eventfs: Save ownership and mode")
Reported-by: default avatarMilian Wolff <milian.wolff@kdab.com>
Signed-off-by: default avatarSteven Rostedt (Google) <rostedt@goodmis.org>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarZheng Zengkai <zhengzengkai@huawei.com>
parent d74eb76f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment