diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2022-08-14 21:16:18 +0200 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2022-08-14 21:16:18 +0200 |
commit | 3f61631d47f115b83c935d0039f95cb68b0c8ab7 (patch) | |
tree | 9e32fe16349d823d8b58deea5d614a9675821c57 /fs/proc | |
parent | Merge tag 'for-linus-6.0-rc1b-tag' of git://git.kernel.org/pub/scm/linux/kern... (diff) | |
download | linux-3f61631d47f115b83c935d0039f95cb68b0c8ab7.tar.xz linux-3f61631d47f115b83c935d0039f95cb68b0c8ab7.zip |
take care to handle NULL ->proc_lseek()
Easily done now, just by clearing FMODE_LSEEK in ->f_mode
during proc_reg_open() for such entries.
Fixes: 868941b14441 "fs: remove no_llseek"
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/proc')
-rw-r--r-- | fs/proc/inode.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/proc/inode.c b/fs/proc/inode.c index f130499ad843..f495fdb39151 100644 --- a/fs/proc/inode.c +++ b/fs/proc/inode.c @@ -494,6 +494,9 @@ static int proc_reg_open(struct inode *inode, struct file *file) typeof_member(struct proc_ops, proc_release) release; struct pde_opener *pdeo; + if (!pde->proc_ops->proc_lseek) + file->f_mode &= ~FMODE_LSEEK; + if (pde_is_permanent(pde)) { open = pde->proc_ops->proc_open; if (open) |