linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Harald Welte <laforge@gnumonks.org>
Cc: rmk+serial@arm.linux.org.uk,
	linuxppc-dev list <linuxppc-dev@lists.linuxppc.org>
Subject: Re: [PATCH] pmac_zilog.c: Fix break handling, add sysrq support
Date: Tue, 10 Aug 2004 10:24:17 +1000	[thread overview]
Message-ID: <1092097456.14100.54.camel@gaston> (raw)
In-Reply-To: <20040808112147.GA31341@obroa-skai.de.gnumonks.org>


>
> Yes, I agree, that sounds way cleaner than just not lock at all in
> console_write().  But then of course you could still runt into a race
> condition where another thread is already spinning for the lock.  As
> soon as we drop the lock, the other thread would grab it... and when
> console_write() is called via handle_sysrq(), it's already too late,
> isn't it?

Ugh ? handle_sysrq() is called from irq, this should be an irqsafe
lock, another thread on another cpu would just cause us to wait a bit...

> I think this is a generic issue that all serial drivers supporting
> sysrq() face.  Instead of putting some special different solution into
> each driver, I'd say the code from sn_sal_console_write() needs to be
> generalized.
>
> Cc'ing the serial maintainer exactly for this reason.
>
> Russell, what is the preferred solution for this deadlock-prone
> situation?
>
> > I'll have a look, thanks much.
> > Ben.
--
Benjamin Herrenschmidt <benh@kernel.crashing.org>


** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

      reply	other threads:[~2004-08-10  0:24 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-08-06 10:43 [PATCH] pmac_zilog.c: Fix break handling, add sysrq support Harald Welte
2004-08-06 10:44 ` Benjamin Herrenschmidt
2004-08-08 11:21   ` Harald Welte
2004-08-10  0:24     ` Benjamin Herrenschmidt [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=1092097456.14100.54.camel@gaston \
    --to=benh@kernel.crashing.org \
    --cc=laforge@gnumonks.org \
    --cc=linuxppc-dev@lists.linuxppc.org \
    --cc=rmk+serial@arm.linux.org.uk \
    /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;
as well as URLs for NNTP newsgroup(s).