diff options
author | Andrew McGregor <andrew.mcgregor@alliedtelesis.co.nz> | 2011-06-12 19:31:31 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-07-01 18:40:19 -0400 |
commit | 7b292b4bf9a9d6098440d85616d6ca4c608b8304 (patch) | |
tree | 7379200214ddeafe1cdaa6f1ebc29aba58c2d868 /drivers | |
parent | 8168e9c2de7383c497aff9cd906dd475f9b42b2c (diff) |
tty: fix "IRQ45: nobody cared"
Unthrottling the TTY during close ends up enabling interrupts
on a device not on the active list, which will never have the
interrupts cleared. Doctor, it hurts when I do this.
>>> On 6/2/2011 at 01:56 AM, in message <20110601145608.3e586e16@bob.linux.org.uk>, Alan Cox <alan@linux.intel.com> wrote:
> On Wed, 01 Jun 2011 10:34:07 +1200
> "andrew mcgregor" <andrew.mcgregor@alliedtelesis.co.nz> wrote:
> > The LKML message
> > http://kerneltrap.org/mailarchive/linux-kernel/2010/2/25/4541847 from
> > February doesn't seem to have been resolved since. We struck the
> > issue, and the patch below (against 2.6.32) fixes it. Should I
> > supply a patch against 3.0.0rc?
>
> I think that would be sensible. I don't actually see how you hit it as
> the IRQ ought to be masked by then but it's certainly wrong for n_tty
> to be calling into check_unthrottle at that point.
>
> So yes please send a patch with a suitable Signed-off-by: line to
> linux-serial and cc GregKH <greg@kroah.com> as well.
>
> Alan
Signed-off-by: Andrew McGregor <andrew.mcgregor@alliedtelesis.co.nz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/tty/n_tty.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/tty/n_tty.c b/drivers/tty/n_tty.c index 0ad32888091c..1ddc5d7c9592 100644 --- a/drivers/tty/n_tty.c +++ b/drivers/tty/n_tty.c | |||
@@ -185,7 +185,6 @@ static void reset_buffer_flags(struct tty_struct *tty) | |||
185 | tty->canon_head = tty->canon_data = tty->erasing = 0; | 185 | tty->canon_head = tty->canon_data = tty->erasing = 0; |
186 | memset(&tty->read_flags, 0, sizeof tty->read_flags); | 186 | memset(&tty->read_flags, 0, sizeof tty->read_flags); |
187 | n_tty_set_room(tty); | 187 | n_tty_set_room(tty); |
188 | check_unthrottle(tty); | ||
189 | } | 188 | } |
190 | 189 | ||
191 | /** | 190 | /** |
@@ -1587,6 +1586,7 @@ static int n_tty_open(struct tty_struct *tty) | |||
1587 | return -ENOMEM; | 1586 | return -ENOMEM; |
1588 | } | 1587 | } |
1589 | reset_buffer_flags(tty); | 1588 | reset_buffer_flags(tty); |
1589 | tty_unthrottle(tty); | ||
1590 | tty->column = 0; | 1590 | tty->column = 0; |
1591 | n_tty_set_termios(tty, NULL); | 1591 | n_tty_set_termios(tty, NULL); |
1592 | tty->minimum_to_wake = 1; | 1592 | tty->minimum_to_wake = 1; |