Skip to content

Commit 3f61631

Browse files
author
Al Viro
committed
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: 868941b "fs: remove no_llseek" Signed-off-by: Al Viro <[email protected]>
1 parent 5d6a0f4 commit 3f61631

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

fs/proc/inode.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -494,6 +494,9 @@ static int proc_reg_open(struct inode *inode, struct file *file)
494494
typeof_member(struct proc_ops, proc_release) release;
495495
struct pde_opener *pdeo;
496496

497+
if (!pde->proc_ops->proc_lseek)
498+
file->f_mode &= ~FMODE_LSEEK;
499+
497500
if (pde_is_permanent(pde)) {
498501
open = pde->proc_ops->proc_open;
499502
if (open)

0 commit comments

Comments
 (0)