From: Benjamin Herrenschmidt <benh@kernel•crashing.org>
To: Jiri Slaby <jslaby@suse•cz>
Cc: linuxppc-dev@ozlabs•org, gregkh@linuxfoundation•org,
Paul Mackerras <paulus@samba•org>,
anton@samba•org, alan@linux•intel.com
Subject: Re: [PATCH] TTY: hvc_console, fix port reference count going to zero prematurely
Date: Wed, 14 Nov 2012 23:47:59 +1100 [thread overview]
Message-ID: <1352897279.23412.22.camel@pasglop> (raw)
In-Reply-To: <50A36844.7080207@suse.cz>
On Wed, 2012-11-14 at 10:45 +0100, Jiri Slaby wrote:
> > This fixes it by removing the extra kref_put() and tty_kref_put() calls.
>
> Oh yeah. Thanks.
>
> Acked-by: Jiri Slaby <jslaby@suse•cz>
So who's merging it ?
Cheers,
Ben.
> > Signed-off-by: Paul Mackerras <paulus@samba•org>
> > Cc: stable@vger•kernel.org
> > ---
> > drivers/tty/hvc/hvc_console.c | 7 -------
> > 1 file changed, 7 deletions(-)
> >
> > diff --git a/drivers/tty/hvc/hvc_console.c b/drivers/tty/hvc/hvc_console.c
> > index a5dec1c..13ee53b 100644
> > --- a/drivers/tty/hvc/hvc_console.c
> > +++ b/drivers/tty/hvc/hvc_console.c
> > @@ -424,7 +424,6 @@ static void hvc_hangup(struct tty_struct *tty)
> > {
> > struct hvc_struct *hp = tty->driver_data;
> > unsigned long flags;
> > - int temp_open_count;
> >
> > if (!hp)
> > return;
> > @@ -444,7 +443,6 @@ static void hvc_hangup(struct tty_struct *tty)
> > return;
> > }
> >
> > - temp_open_count = hp->port.count;
> > hp->port.count = 0;
> > spin_unlock_irqrestore(&hp->port.lock, flags);
> > tty_port_tty_set(&hp->port, NULL);
> > @@ -453,11 +451,6 @@ static void hvc_hangup(struct tty_struct *tty)
> >
> > if (hp->ops->notifier_hangup)
> > hp->ops->notifier_hangup(hp, hp->data);
> > -
> > - while(temp_open_count) {
> > - --temp_open_count;
> > - tty_port_put(&hp->port);
> > - }
> > }
> >
> > /*
> >
>
>
next prev parent reply other threads:[~2012-11-14 12:48 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-14 8:15 [PATCH] TTY: hvc_console, fix port reference count going to zero prematurely Paul Mackerras
2012-11-14 9:45 ` Jiri Slaby
2012-11-14 12:47 ` Benjamin Herrenschmidt [this message]
2012-11-14 15:09 ` Greg KH
2012-11-14 20:48 ` Benjamin Herrenschmidt
2012-11-14 20:54 ` Greg KH
2012-11-14 20:57 ` Benjamin Herrenschmidt
2012-11-14 23:02 ` Paul Mackerras
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=1352897279.23412.22.camel@pasglop \
--to=benh@kernel$(echo .)crashing.org \
--cc=alan@linux$(echo .)intel.com \
--cc=anton@samba$(echo .)org \
--cc=gregkh@linuxfoundation$(echo .)org \
--cc=jslaby@suse$(echo .)cz \
--cc=linuxppc-dev@ozlabs$(echo .)org \
--cc=paulus@samba$(echo .)org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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