Re: [PATCH] secure unlock_task_sighand() call

From: Oleg Nesterov
Date: Mon Dec 23 2013 - 09:26:01 EST


On 12/23, naveen yadav wrote:
>
> Happy Christmas !!!

Thanks, the same to you ;)

> We are facing OOPS during core dump on kernel 3.8.x on ARM target.

Do you have any traces? Any additional info?

Can you try the fresh kernels?

Not that I can recall any change in this area which could help, but
perhaps this is arm specific...

> So we were doing core review and found this.

Do you mean that with this patch the kernel doesn't crash?

> Also I think in zap_process() there is no need to send SIGKILL to
> ZOMBIE or DEAD process.

Yes, it would be very wrong to account a zombie, but:

> --- a/fs/coredump.c
> +++ b/fs/coredump.c
> @@ -271,17 +271,19 @@ static int zap_process(struct task_struct
> *start, int exit_code)
>
> - if (t != current && t->mm) {
> + if (t->exit_state) {
> + nr++;
> + } else if (t != current && t->mm) {

This change adds no harm, but it is misleading and unneeded. Please note
that t->mm != NULL && t->exit_state != 0 is not possible, exit_mm() is
called before exit_notify(). IOW, a zombie thread can't have ->mm.

Oleg.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/