Dear Maintainer, this issue seems to start since patch: features/all/lockdown/0031-tracefs-Restrict-tracefs-when-the-kernel-is-locked-d.patch
Therefore a vanialla build does not show this issue. With either of the following changes on top of all debian patches, the exception does not happen. But the first does also prevent opening the file when not locked down. The second allows to open the file, but cannot say if the intended effect of the patch for lockdowned kernels is still given. Kind regards, Bernhard diff --git a/fs/tracefs/inode.c b/fs/tracefs/inode.c index 338c791c9a0e..f446977bf9c8 100644 --- a/fs/tracefs/inode.c +++ b/fs/tracefs/inode.c @@ -41,6 +41,8 @@ static int default_open_file(struct inode *inode, struct file *filp) return -EPERM; real_fops = dentry->d_fsdata; + if (!real_fops->open) + return -EINVAL; return real_fops->open(inode, filp); } diff --git a/fs/tracefs/inode.c b/fs/tracefs/inode.c index 338c791c9a0e..d37c959291ab 100644 --- a/fs/tracefs/inode.c +++ b/fs/tracefs/inode.c @@ -438,7 +438,7 @@ struct dentry *tracefs_create_file(const char *name, umode_t mode, dentry->d_fsdata = (void *)fops; memcpy(proxy_fops, fops, sizeof(*proxy_fops)); - proxy_fops->open = default_open_file; + proxy_fops->open = fops->open ? default_open_file : NULL; inode->i_mode = mode; inode->i_fop = proxy_fops; inode->i_private = data;