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: Sun, 08 Jul 2012 11:58:46 +0300 [thread overview]
Message-ID: <4FF94BC6.3000704@liveu.tv> (raw)
In-Reply-To: <20120706212430.GA454@kroah.com>
[-- Attachment #1: Type: text/plain, Size: 761 bytes --]
On 07/07/2012 12:24 AM, Greg KH wrote:
> On Sun, Jul 01, 2012 at 09:53:19AM +0300, Shachar Shemesh wrote:
>> 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.
>>
> All tabs are converted to spaces and make this patch impossible to apply
> :(
>
> Care to try again?
I'm sorry, I'm sending this as an attachment. I've verified that my
mailer sends this as plain text, so it should be okay.
Shachar
[-- Attachment #2: pppduinterruptible.patch --]
[-- Type: text/x-diff, Size: 495 bytes --]
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);
next prev parent reply other threads:[~2012-07-08 8:58 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 [this message]
2012-07-09 16:44 ` Greg KH
2012-07-10 4:54 ` Shachar Shemesh
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=4FF94BC6.3000704@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