projects
/
platform
/
kernel
/
linux-rpi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5d6a0f4
)
take care to handle NULL ->proc_lseek()
author
Al Viro
<viro@zeniv.linux.org.uk>
Sun, 14 Aug 2022 19:16:18 +0000
(15:16 -0400)
committer
Al Viro
<viro@zeniv.linux.org.uk>
Sun, 14 Aug 2022 19:16:18 +0000
(15:16 -0400)
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>
fs/proc/inode.c
patch
|
blob
|
history
diff --git
a/fs/proc/inode.c
b/fs/proc/inode.c
index
f130499
..
f495fdb
100644
(file)
--- 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)