Skip to content
Commit 16b52bbe authored by Amir Goldstein's avatar Amir Goldstein Committed by Al Viro
Browse files

kernfs: annotate different lockdep class for of->mutex of writable files



The writable file /sys/power/resume may call vfs lookup helpers for
arbitrary paths and readonly files can be read by overlayfs from vfs
helpers when sysfs is a lower layer of overalyfs.

To avoid a lockdep warning of circular dependency between overlayfs
inode lock and kernfs of->mutex, use a different lockdep class for
writable and readonly kernfs files.

Reported-by: default avatar <syzbot+9a5b0ced8b1bfb238b56@syzkaller.appspotmail.com>
Fixes: 0fedefd4

 ("kernfs: sysfs: support custom llseek method for sysfs entries")
Suggested-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
Signed-off-by: default avatarAmir Goldstein <amir73il@gmail.com>
Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
parent fec50db7
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment