]> git.karo-electronics.de Git - karo-tx-linux.git/commit
coredump: '% at the end' shouldn't bypass core_uses_pid logic
authorOleg Nesterov <oleg@redhat.com>
Thu, 27 Jun 2013 23:53:53 +0000 (09:53 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Fri, 28 Jun 2013 06:38:56 +0000 (16:38 +1000)
commitaf1f28bb8ef17b6a1972910cf658d1e2412670e1
treea8239f6a6002701ff22d24a4ec718d12fdbbe8ff
parent2128c1a50da6dafd1e765209136e03ebf8fd0073
coredump: '% at the end' shouldn't bypass core_uses_pid logic

"goto end" should not bypass the "Backward compatibility with
core_uses_pid" code, move this label up.

While at it,

- It is ugly to copy '|' into cn->corename and then inc
  the pointer for argv_split().

  Change format_corename() to increment pat_ptr instead.

- Remove the dead "if (*pat_ptr == 0)" in format_corename(),
  we already checked it is not zero.

Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: Colin Walters <walters@verbum.org>
Cc: Denys Vlasenko <vda.linux@googlemail.com>
Cc: Jiri Slaby <jslaby@suse.cz>
Cc: Lennart Poettering <mzxreary@0pointer.de>
Cc: Lucas De Marchi <lucas.de.marchi@gmail.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
fs/coredump.c