]> 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>
Fri, 7 Jun 2013 00:09:40 +0000 (10:09 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Mon, 17 Jun 2013 08:20:28 +0000 (18:20 +1000)
commit08ce23dd3694493c9240ed7d470990a6ff62a7f5
tree3e77951f2b2037b1e518da00e5cf787ff4530c55
parent260eda0a582aff2fd2035ebf41eec5fbfb4028cd
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