Merge tag 'mm-hotfixes-stable-2023-11-17-14-04' of git://git.kernel.org/pub/scm/linux...
[linux-block.git] / fs / coredump.c
index 88740c51b94202528243a6a0ed74335e09eee41e..9d235fa14ab98f28fd8c334920647e682fa52767 100644 (file)
@@ -648,7 +648,7 @@ void do_coredump(const kernel_siginfo_t *siginfo)
        } else {
                struct mnt_idmap *idmap;
                struct inode *inode;
-               int open_flags = O_CREAT | O_RDWR | O_NOFOLLOW |
+               int open_flags = O_CREAT | O_WRONLY | O_NOFOLLOW |
                                 O_LARGEFILE | O_EXCL;
 
                if (cprm.limit < binfmt->min_coredump)