Re: [GIT] Networking

Linus Torvalds
2011-01-20T23:43:58Z

On Thu, Jan 20, 2011 at 2:38 PM, Colin Walters <walters@verbum.org> wrote:
>
> It is actually; see src/gs-auth-pam.c; there is some pretty scary code
> there; basically all of PAM is put in a thread to avoid blocking the
> mainloop.  Whether the code is actually buggy I can't say immediately;
> it's certainly possible.

I stand corrected.

But it turns out to be a kernel bug after all, although not in
networking. It bisected down to commit e462c448fdc8: "pipe: use event
aware wakeups".

I don't immediately see why, but I suspect it's the pipe_release()
case that needs to add POLLHUP to the wakeup cases. I suspect that
what is going on is that gnome-screensaver-dialog uses a pipe to talk
to the PAM code, and waits for the pipe to close. And we used to wake
it up unconditionally, but now we only wake up the poll waiter if it's
waiting for POLLIN/POLLOUT, rather than for anything else.

Anyway, I'll double-check my bisect by doing a revert of that commit
on top of current -git, but I'm pretty sure the bisect was correct,
since it did end up pointing to a commit that clearly changed poll
behavior.

Linus