[PATCH] coredump: fix dump_align() helper

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

 



The recent rework that introduced dump_emit() and dump_align() breaks
existing core dump logic, which relies on these functions returning non
zero when everything is fine, but right now dump_align() returns 0 if
the current offset is already aligned on a given boundary.

Signed-off-by: Alexander Shishkin <alexander.shishkin@xxxxxxxxxxxxxxx>
---
 fs/coredump.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/coredump.c b/fs/coredump.c
index 62406b6..0be8c01 100644
--- a/fs/coredump.c
+++ b/fs/coredump.c
@@ -734,6 +734,6 @@ int dump_align(struct coredump_params *cprm, int align)
 	unsigned mod = cprm->written & (align - 1);
 	if (align & (align - 1))
 		return -EINVAL;
-	return mod ? dump_skip(cprm, align - mod) : 0;
+	return mod ? dump_skip(cprm, align - mod) : 1;
 }
 EXPORT_SYMBOL(dump_align);
-- 
1.8.5.1

--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




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