Commit 74cbb480 authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'pull-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs

Pull vfs lseek fix from Al Viro:
 "Fix proc_reg_llseek() breakage. Always had been possible if somebody
  left NULL ->proc_lseek, became a practical issue now"

* tag 'pull-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
  take care to handle NULL ->proc_lseek()
parents 5d6a0f4d 3f61631d
...@@ -494,6 +494,9 @@ static int proc_reg_open(struct inode *inode, struct file *file) ...@@ -494,6 +494,9 @@ static int proc_reg_open(struct inode *inode, struct file *file)
typeof_member(struct proc_ops, proc_release) release; typeof_member(struct proc_ops, proc_release) release;
struct pde_opener *pdeo; struct pde_opener *pdeo;
if (!pde->proc_ops->proc_lseek)
file->f_mode &= ~FMODE_LSEEK;
if (pde_is_permanent(pde)) { if (pde_is_permanent(pde)) {
open = pde->proc_ops->proc_open; open = pde->proc_ops->proc_open;
if (open) if (open)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment