diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-12-17 01:11:28 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-12-17 01:11:28 +0100 |
commit | 138a6d7ea2deb3080116a4f99019e181b62e5ce5 (patch) | |
tree | 424622059405352935fbf1dde015a1e130b56198 /fs/proc | |
parent | Documentation: ja_JP: Update broken link to tpp (diff) | |
parent | Linux 3.13-rc4 (diff) | |
download | linux-138a6d7ea2deb3080116a4f99019e181b62e5ce5.tar.xz linux-138a6d7ea2deb3080116a4f99019e181b62e5ce5.zip |
Merge 3.13-rc4 into char-misc-next
We want these fixes in here.
Diffstat (limited to 'fs/proc')
-rw-r--r-- | fs/proc/inode.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/fs/proc/inode.c b/fs/proc/inode.c index 28955d4b7218..124fc43c7090 100644 --- a/fs/proc/inode.c +++ b/fs/proc/inode.c @@ -292,16 +292,20 @@ proc_reg_get_unmapped_area(struct file *file, unsigned long orig_addr, { struct proc_dir_entry *pde = PDE(file_inode(file)); unsigned long rv = -EIO; - unsigned long (*get_area)(struct file *, unsigned long, unsigned long, - unsigned long, unsigned long) = NULL; + if (use_pde(pde)) { + typeof(proc_reg_get_unmapped_area) *get_area; + + get_area = pde->proc_fops->get_unmapped_area; #ifdef CONFIG_MMU - get_area = current->mm->get_unmapped_area; + if (!get_area) + get_area = current->mm->get_unmapped_area; #endif - if (pde->proc_fops->get_unmapped_area) - get_area = pde->proc_fops->get_unmapped_area; + if (get_area) rv = get_area(file, orig_addr, len, pgoff, flags); + else + rv = orig_addr; unuse_pde(pde); } return rv; |