diff --git a/[refs] b/[refs] index a0303c7a9509..f55855e264f3 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: c81fac5cb8c92b8b4795ac250a46c7514d1fce06 +refs/heads/master: 7b98c2e402eaa1f2beec18b1bde17f74948a19db diff --git a/trunk/mm/oom_kill.c b/trunk/mm/oom_kill.c index 907e2c0ad7a6..64cdacad83d9 100644 --- a/trunk/mm/oom_kill.c +++ b/trunk/mm/oom_kill.c @@ -645,6 +645,16 @@ void out_of_memory(struct zonelist *zonelist, gfp_t gfp_mask, /* Got some memory back in the last second. */ return; + /* + * If current has a pending SIGKILL, then automatically select it. The + * goal is to allow it to allocate so that it may quickly exit and free + * its memory. + */ + if (fatal_signal_pending(current)) { + set_thread_flag(TIF_MEMDIE); + return; + } + if (sysctl_panic_on_oom == 2) { dump_header(NULL, gfp_mask, order, NULL); panic("out of memory. Compulsory panic_on_oom is selected.\n");