commit | 86cc05840a0da1afcb6b8151b53f3b606457c91b | [log] [tgz] |
---|---|---|
author | Al Viro <viro@zeniv.linux.org.uk> | Fri Apr 03 15:23:17 2015 -0400 |
committer | Al Viro <viro@zeniv.linux.org.uk> | Sat Apr 11 22:29:39 2015 -0400 |
tree | 3fb22642b2cd4f42db776277807e09e478db95c6 | |
parent | 283e7e5d249f4861c797679b6a5b53d525194c98 [diff] [blame] |
coredump: accept any write method Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
diff --git a/fs/coredump.c b/fs/coredump.c index f319926..bbbe139 100644 --- a/fs/coredump.c +++ b/fs/coredump.c
@@ -657,7 +657,7 @@ */ 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;