summaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2015-04-03 15:23:17 -0400
committerSasha Levin <sasha.levin@oracle.com>2015-06-09 13:43:40 -0400
commit6a381f532a0a998cb464d6fdaf5956b1446014b1 (patch)
tree95d802fab9ba54d87316476013f61338d0c6202a /fs
parent498a61ea26e42f6e9861be9af860755ac2ecd70f (diff)
coredump: accept any write method
[ Upstream commit 86cc05840a0da1afcb6b8151b53f3b606457c91b ] Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
Diffstat (limited to 'fs')
-rw-r--r--fs/coredump.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/coredump.c b/fs/coredump.c
index b5c86ffd5033..4c5866b948e7 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;