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