From: Alan Cox <alan@linux.intel.com>
To: Dan Carpenter <error27@gmail.com>
Cc: Greg Kroah-Hartman <gregkh@suse.de>,
linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [patch] TTY/n_gsm: potential double lock
Date: Tue, 25 May 2010 12:42:58 +0000 [thread overview]
Message-ID: <20100525134258.568a600f@linux.intel.com> (raw)
In-Reply-To: <20100525093717.GC22515@bicker>
On Tue, 25 May 2010 11:37:17 +0200
Dan Carpenter <error27@gmail.com> wrote:
> In gsm_dlci_data_kick() we call gsm_dlci_data_sweep() with the
> "gsm->tx_lock" held so we can't lock it again inside
> gsm_dlci_data_sweep(). I removed that lock from and added one to
> gsmld_write_wakeup() instead. The sweep function is only called from
> those two places.
Well spotted - I'm surprised that escaped as I've been using the code a
fair bit in that exact form. Not immediately obvious that the case
should be that hard to trigger.
> Signed-off-by: Dan Carpenter <error27@gmail.com>
Acked-by: Alan Cox <alan@linux.intel.com>
WARNING: multiple messages have this Message-ID (diff)
From: Alan Cox <alan@linux.intel.com>
To: Dan Carpenter <error27@gmail.com>
Cc: Greg Kroah-Hartman <gregkh@suse.de>,
linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [patch] TTY/n_gsm: potential double lock
Date: Tue, 25 May 2010 13:42:58 +0100 [thread overview]
Message-ID: <20100525134258.568a600f@linux.intel.com> (raw)
In-Reply-To: <20100525093717.GC22515@bicker>
On Tue, 25 May 2010 11:37:17 +0200
Dan Carpenter <error27@gmail.com> wrote:
> In gsm_dlci_data_kick() we call gsm_dlci_data_sweep() with the
> "gsm->tx_lock" held so we can't lock it again inside
> gsm_dlci_data_sweep(). I removed that lock from and added one to
> gsmld_write_wakeup() instead. The sweep function is only called from
> those two places.
Well spotted - I'm surprised that escaped as I've been using the code a
fair bit in that exact form. Not immediately obvious that the case
should be that hard to trigger.
> Signed-off-by: Dan Carpenter <error27@gmail.com>
Acked-by: Alan Cox <alan@linux.intel.com>
next prev parent reply other threads:[~2010-05-25 12:42 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-25 9:37 [patch] TTY/n_gsm: potential double lock Dan Carpenter
2010-05-25 9:37 ` Dan Carpenter
2010-05-25 12:42 ` Alan Cox [this message]
2010-05-25 12:42 ` Alan Cox
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=20100525134258.568a600f@linux.intel.com \
--to=alan@linux.intel.com \
--cc=error27@gmail.com \
--cc=gregkh@suse.de \
--cc=kernel-janitors@vger.kernel.org \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.