Messages in this thread | | | Date | Sun, 20 Aug 2006 19:25:15 +0400 | From | Solar Designer <> | Subject | Re: [PATCH] set*uid() must not fail-and-return on OOM/rlimits |
| |
On Sun, Aug 20, 2006 at 10:26:02AM +0200, Willy Tarreau wrote: > I'm just wondering why you return a SIGSEGV.
I've taken the SIGSEGV from binfmt_elf.c, where it is used on "Unable to load interpreter", a condition that commonly occurs on OOM.
> When the kernel kills > tasks on OOM conditions, it sends either SIGTERM or SIGKILL, as we > can see here in mm/oom_kill.c:__oom_kill_task() : > > p->flags |= PF_MEMALLOC | PF_MEMDIE; > /* This process has hardware access, be more careful. */ > if (cap_t(p->cap_effective) & CAP_TO_MASK(CAP_SYS_RAWIO)) { > force_sig(SIGTERM, p); > } else { > force_sig(SIGKILL, p); > } > > Shouldn't we simply re-use the same code ?
I have no objections.
Thanks,
Alexander - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |