diff options
Diffstat (limited to 'fs')
-rw-r--r-- | fs/coredump.c | 2 |
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) | |||
657 | */ | 657 | */ |
658 | if (!uid_eq(inode->i_uid, current_fsuid())) | 658 | if (!uid_eq(inode->i_uid, current_fsuid())) |
659 | goto close_fail; | 659 | goto close_fail; |
660 | if (!cprm.file->f_op->write) | 660 | if (!(cprm.file->f_mode & FMODE_CAN_WRITE)) |
661 | goto close_fail; | 661 | goto close_fail; |
662 | if (do_truncate(cprm.file->f_path.dentry, 0, 0, cprm.file)) | 662 | if (do_truncate(cprm.file->f_path.dentry, 0, 0, cprm.file)) |
663 | goto close_fail; | 663 | goto close_fail; |