[PATCH v1] fs/coredump: check return value of dump_emit()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Check dump_emit() return value to see whether it fails

Signed-off-by: Li Zhong <floridsleeves@xxxxxxxxx>
---
 fs/coredump.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/fs/coredump.c b/fs/coredump.c
index 9f4aae202109..4f51bdcecc5e 100644
--- a/fs/coredump.c
+++ b/fs/coredump.c
@@ -762,7 +762,8 @@ void do_coredump(const kernel_siginfo_t *siginfo)
 		 */
 		if (cprm.to_skip) {
 			cprm.to_skip--;
-			dump_emit(&cprm, "", 1);
+			if (!dump_emit(&cprm, "", 1))
+				goto close_fail;
 		}
 		file_end_write(cprm.file);
 		free_vma_snapshot(&cprm);
-- 
2.25.1




[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux