public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "David S. Miller" <davem@davemloft.net>
To: Alan Cox <alan@redhat.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Fixing the holes in the tty layer
Date: Thu, 9 Sep 2004 09:38:18 -0700	[thread overview]
Message-ID: <20040909093818.5a54094d.davem@davemloft.net> (raw)
In-Reply-To: <20040909162222.GA14563@devserv.devel.redhat.com>

On Thu, 9 Sep 2004 12:22:22 -0400
Alan Cox <alan@redhat.com> wrote:

> +void tty_ldisc_put(int disc)

That takes tty_ldisc_lock.

>  static int tty_set_ldisc(struct tty_struct *tty, int ldisc)
 ...
> +	spin_lock_irqsave(&tty_ldisc_lock, flags);
> +	if(tty->ldisc.refcount)
> +	{
> +		/* Free the new ldisc we grabbed */
> +		tty_ldisc_put(ldisc);
> +		spin_unlock_irqrestore(&tty_ldisc_lock, flags);
> +		return -EBUSY;
> +	}

Therefore this call her deadlocks since we already hold
the lock.

      reply	other threads:[~2004-09-09 16:57 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-09-09 16:22 Fixing the holes in the tty layer Alan Cox
2004-09-09 16:38 ` David S. Miller [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=20040909093818.5a54094d.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=alan@redhat.com \
    --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