Re: [PATCH] exit.c: call proc_exit_connector() after exit_state is set

From: Linus Torvalds
Date: Sat Mar 15 2014 - 15:22:12 EST


On Sat, Mar 15, 2014 at 12:12 PM, Oleg Nesterov <oleg@xxxxxxxxxx> wrote:
>
> So I think the patch is fine, but let me repeat:
>
> I hope that someone
> can confirm that netlink_broadcast() is safe even if release_task(current)
> was already called, so that the caller has no pids, sighand, is not visible
> via /proc/, etc.
>
> not that I expect this should not work, but still.

Ok. I think people use netlink_broadcast from irq context (well,
strictly speaking looks lik ebottom half) judging by the GFP_ATOMIC
users, so that had better work regardless.

> Yes... BTW, Guillaume, I forgot to mention that perhaps you can use
> signalfd(SIGCHLD) instead of connector, this is epoll-able too. SIGCHLD
> doesn't queue, so it can't tell you which child has exited, but WNOHANG
> should work.

Yeah, that sounds like a good approach if SIGCHLD is the only thing needed.

Anyway, I see that the patch is apparently in -mm, and I think your
netlink_broadcast issue should be fine, so things are moving along.
It's not like this is a new issue or even so much an outright "bug" as
a misfeature.

Linus
--
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/