mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-01 10:45:49 +00:00
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: 868941b144
"fs: remove no_llseek"
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
parent
5d6a0f4da9
commit
3f61631d47
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user