public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Li, ZhenHua" <zhen-hual@hp.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Jiri Slaby <jslaby@suse.cz>,
	linux-kernel@vger.kernel.org
Cc: "Li, Zhen-Hua" <zhen-hual@hp.com>
Subject: Re: [PATCH 1/1] drivers/tty: Fix missed unlocks for tty_release
Date: Mon, 09 Dec 2013 12:13:50 +0800	[thread overview]
Message-ID: <52A5437E.2030708@hp.com> (raw)
In-Reply-To: <1386559228-26880-1-git-send-email-zhen-hual@hp.com>

Hi,

I found it was incorrect. So please IGNORE this patch.
Sorry for that.


On 12/09/2013 11:20 AM, Li, Zhen-Hua wrote:
> In function tty_release, there are two unlock not called while
> breaking from a while. This may cause problems.
> This patch fixed this problem , adding the two unlocks before
> break is called.
>
> Signed-off-by: Li, Zhen-Hua <zhen-hual@hp.com>
> ---
>   drivers/tty/tty_io.c | 6 ++++--
>   1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/tty/tty_io.c b/drivers/tty/tty_io.c
> index c74a00a..d41b0da 100644
> --- a/drivers/tty/tty_io.c
> +++ b/drivers/tty/tty_io.c
> @@ -1777,9 +1777,11 @@ int tty_release(struct inode *inode, struct file *filp)
>   				do_sleep++;
>   			}
>   		}
> -		if (!do_sleep)
> +		if (!do_sleep) {
> +			tty_unlock_pair(tty, o_tty);
> +			mutex_unlock(&tty_mutex);
>   			break;
> -
> +		}
>   		printk(KERN_WARNING "%s: %s: read/write wait queue active!\n",
>   				__func__, tty_name(tty, buf));
>   		tty_unlock_pair(tty, o_tty);
>


      reply	other threads:[~2013-12-09  4:13 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-09  3:20 [PATCH 1/1] drivers/tty: Fix missed unlocks for tty_release Li, Zhen-Hua
2013-12-09  4:13 ` Li, ZhenHua [this message]

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=52A5437E.2030708@hp.com \
    --to=zhen-hual@hp.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jslaby@suse.cz \
    --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