aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2015-04-03 15:23:17 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-05-17 09:55:10 -0700
commit5d457f81823abb832f1531e645bc4bf3ec23c876 (patch)
treee4574b45fd22f6cbca7793b544538c851be03121
parentfe3316751728320ca0e3004f79f2bbfbcc41cd10 (diff)
downloadlinux-linaro-stable-5d457f81823abb832f1531e645bc4bf3ec23c876.tar.gz
coredump: accept any write method
commit 86cc05840a0da1afcb6b8151b53f3b606457c91b upstream. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--fs/coredump.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/coredump.c b/fs/coredump.c
index f319926ddf8c..bbbe139ab280 100644
--- a/fs/coredump.c
+++ b/fs/coredump.c
@@ -657,7 +657,7 @@ void do_coredump(const siginfo_t *siginfo)
*/
if (!uid_eq(inode->i_uid, current_fsuid()))
goto close_fail;
- if (!cprm.file->f_op->write)
+ if (!(cprm.file->f_mode & FMODE_CAN_WRITE))
goto close_fail;
if (do_truncate(cprm.file->f_path.dentry, 0, 0, cprm.file))
goto close_fail;