lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 18 Sep 2009 15:20:18 +0400
From:	Peter Volkov <pva@...too.org>
To:	Linus Torvalds <torvalds@...ux-foundation.org>
Cc:	gregkh@...e.de, linux-kernel <linux-kernel@...r.kernel.org>
Subject: Re: 2.6.31 regression: system hang after pptp connection
 established

The patch fixes the problem here. Thank you very much.

--
Peter.

В Чтв, 17/09/2009 в 14:12 -0700, Linus Torvalds пишет:
> 
> On Thu, 17 Sep 2009, Linus Torvalds wrote:
> > 
> > What's interesting about it is that it shows a problem, but the problem it 
> > shows would seem to have nothing at all to do with ppp or networking or 
> > pty's. The problem seems to be processes stuck in disk-wait:
> 
> Ahh. I think I see what may be going on.
> 
> Somebody got a filesystem mutex, and then went to sleep due to IO. Then 
> pptp comes in, and seems to be stuck in a loop in kernel space, and 
> it seems to be stuck with preemption off.
> 
> So one CPU is stuck, and the thing that we want to run is on the same 
> run-queue, and not preempting. An looking at your CPU#1 trace, it's likely 
> looping in ppp_async_push().
> 
> And that whole loop is insane (and very prone to infinite loops), but it 
> also depends on that tty wakeup() thing.
> 
> Does this patch make a difference? Make sure to _not_ try to do the whole 
> wakeup thing if we couldn't actually insert anything into the tty buffers.
> 
> 		Linus
> ---
>  drivers/char/pty.c |    6 ++++--
>  1 files changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/char/pty.c b/drivers/char/pty.c
> index b33d668..53761ce 100644
> --- a/drivers/char/pty.c
> +++ b/drivers/char/pty.c
> @@ -120,8 +120,10 @@ static int pty_write(struct tty_struct *tty, const unsigned char *buf, int c)
>  		/* Stuff the data into the input queue of the other end */
>  		c = tty_insert_flip_string(to, buf, c);
>  		/* And shovel */
> -		tty_flip_buffer_push(to);
> -		tty_wakeup(tty);
> +		if (c) {
> +			tty_flip_buffer_push(to);
> +			tty_wakeup(tty);
> +		}
>  	}
>  	return c;
>  }

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ