public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Shachar Shemesh <shachar@liveu.tv>
To: Greg KH <greg@kroah.com>
Cc: LKML <linux-kernel@vger.kernel.org>
Subject: Re: Subject: [PATCH] tty ldisc: Close/Reopen race prevention should check the proper flag
Date: Tue, 10 Jul 2012 07:54:13 +0300	[thread overview]
Message-ID: <4FFBB575.6050602@liveu.tv> (raw)
In-Reply-To: <20120709164402.GA14592@kroah.com>

[-- Attachment #1: Type: text/plain, Size: 476 bytes --]

On 07/09/2012 07:44 PM, Greg KH wrote:
> Yes, that worked, but then I would have to edit the body to include the
> above information in the patch properly.
>
> So, care to resend it all in a "clean" format that I can apply it in?
>
> thanks,
>
> greg k-h

After a few tests, it seems the only reliable way to get my mailer to 
not munge the tabs is an attachment. I've included the entire details 
inside the attachment. Hopefully, that will be parsable to everyone.

Shachar

[-- Attachment #2: pppduninterruptible.patch --]
[-- Type: text/x-diff, Size: 880 bytes --]

From: Shachar Shemesh <shachar@liveu.tv>

Commit acfa747b introduced the TTY_HUPPING flag to distinguish
closed TTY from currently closing ones. The test in tty_set_ldisc
still remained pointing at the old flag. This causes pppd to
sometimes lapse into uninterruptible sleep when killed and
restarted.

Signed-off-by: Shachar Shemesh <shachar@liveu.tv>
---
Tested with 3.2.20 kernel.

diff --git a/drivers/tty/tty_ldisc.c b/drivers/tty/tty_ldisc.c
index 24b95db..a662a24 100644
--- a/drivers/tty/tty_ldisc.c
+++ b/drivers/tty/tty_ldisc.c
@@ -658,7 +658,7 @@ int tty_set_ldisc(struct tty_struct *tty, int ldisc)
 		goto enable;
 	}
 
-	if (test_bit(TTY_HUPPED, &tty->flags)) {
+	if (test_bit(TTY_HUPPING, &tty->flags)) {
 		/* We were raced by the hangup method. It will have stomped
 		   the ldisc data and closed the ldisc down */
 		clear_bit(TTY_LDISC_CHANGING, &tty->flags);

  reply	other threads:[~2012-07-10  4:54 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-01  6:53 Subject: [PATCH] tty ldisc: Close/Reopen race prevention should check the proper flag Shachar Shemesh
2012-07-06 21:24 ` Greg KH
2012-07-08  8:58   ` Shachar Shemesh
2012-07-09 16:44     ` Greg KH
2012-07-10  4:54       ` Shachar Shemesh [this message]
2012-09-19 19:25         ` Jiri Slaby
2012-09-22  8:35           ` Sasha Levin
2012-09-22  8:42             ` Jiri Slaby
2012-12-19 14:05           ` Džiugas Baltrūnas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4FFBB575.6050602@liveu.tv \
    --to=shachar@liveu.tv \
    --cc=greg@kroah.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox