coredump: fix dump_align() helper
PATCH 1/1 coredump: fix dump_align() helper
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 <[email protected]>
--- fs/coredump.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/coredump.c +1 -1
@@ -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);
Signature · 1 line
1.8.5.1