CHROMIUM: coredump: prevent crash pipe reader from blocking suspend
authorMandeep Singh Baines <msb@chromium.org>
Wed, 13 Feb 2013 03:44:46 +0000 (19:44 -0800)
committerChromeBot <chrome-bot@google.com>
Wed, 20 Feb 2013 22:07:17 +0000 (14:07 -0800)
commit878e5d360fe3d3eddb892eabc75b8dd8f447772a
treebe2510402182adff1916f0ac56ee1d0ffdd08cfe
parent2488c7ac30fe9211830a0f444ff79b4edca35734
CHROMIUM: coredump: prevent crash pipe reader from blocking suspend

Also, prevent hung_task detector from panic()ing the system.

$ # TEST CODE
$ cat pthread_test.c
\#include <pthread.h>
\#include <assert.h>
\#include <unistd.h>

void *task_code(void *argument)
{
   pause();

   return NULL;
}

int main(int argc, char *argv[])
{
   pthread_t thread;
   int rc;

   rc = pthread_create(&thread, NULL, task_code, NULL);
   assert(0 == rc);

   rc = pthread_join(thread, NULL);
   assert(0 == rc);

   return 0;
}
$

$ # TEST PROCESS
$ stop daisydog
$ echo "|/usr/bin/sleep 1d" > /proc/sys/kernel/core_pattern
$ ./pthread_test &
[1] 2872
$ kill -ABRT $!
$ echo mem > /sys/power/state

Sent-upstream: http://thread.gmane.org/gmane.linux.kernel/1441805

BUG=chrome-os-partner:16961
TEST=See above.

Change-Id: I504c210ec7e65f210240c99892d14e73b482b5da
Signed-off-by: Mandeep Singh Baines <msb@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/43163
fs/exec.c
kernel/exit.c