mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ben Hutchings <ben@decadent.org.uk>
To: Dirkjan Bussink <dirkjan.bussink@nedap.com>
Cc: LKML <linux-kernel@vger.kernel.org>, stable@vger.kernel.org
Subject: Re: [PATCH] tty: Prevent deadlock in n_gsm driver
Date: Sat, 02 Mar 2013 19:07:33 +0000	[thread overview]
Message-ID: <1362251253.3768.127.camel@deadeye.wl.decadent.org.uk> (raw)

[-- Attachment #1: Type: text/plain, Size: 911 bytes --]

I'm looking at commit 4d9b109060f690f5c835130ff54165ae157b3087 ('tty:
Prevent deadlock in n_gsm driver') which was cc'd to stable.  This drops
the tty lock in gsm_dlci_release().

I could apply it to 3.2.y with some adjustment, but I checked the
locking context of this function and I think there's another bug to fix.
Tracing back the callers in 3.2.y I found:

gsm_dlci_release
<- gsm_cleanup_mux
   <- gsmld_detach_gsm
      <- gsmld_close
         <- tty_ldisc_close
            <- tty_set_ldisc [with tty_lock]
            <- tty_ldisc_reinit
               <- tty_ldisc_hangup [with tty_lock]
   <- gsmld_config
      <- gsmld_ioctl
         <- tty_ioctl [without tty lock]

and I think the call chains are much the same in mainline.  So
gsmld_config() presumably needs to acquire the tty lock.

Ben.

-- 
Ben Hutchings
Computers are not intelligent.	They only think they are.

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 828 bytes --]

             reply	other threads:[~2013-03-02 19:07 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-02 19:07 Ben Hutchings [this message]
  -- strict thread matches above, loose matches on Subject: below --
2013-01-30 10:44 Dirkjan Bussink
2013-01-29  8:49 [PATCH] " Dirkjan Bussink
2013-01-30  5:12 ` [PATCH] tty: " Greg Kroah-Hartman
2013-01-30  9:51   ` Dirkjan Bussink
2013-01-30 10:10     ` Greg Kroah-Hartman
2013-01-30 10:46       ` Dirkjan Bussink
2013-01-30  9:55   ` Dirkjan Bussink
2013-01-30 10:06     ` Greg Kroah-Hartman

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=1362251253.3768.127.camel@deadeye.wl.decadent.org.uk \
    --to=ben@decadent.org.uk \
    --cc=dirkjan.bussink@nedap.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=stable@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

all inboxes | Powered by JetHome®