linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dmitry Torokhov <dtor_core@ameritech.net>
To: Vojtech Pavlik <vojtech@suse.cz>
Cc: linux-kernel@vger.kernel.org, Vojtech Pavlik <vojtech@suse.cz>,
	Andrew Morton <akpm@osdl.org>
Subject: Re: [2.6 RFC/PATCH] Input: possible deadlock in i8042
Date: Sun, 30 Nov 2003 04:19:28 -0500	[thread overview]
Message-ID: <200311300419.29064.dtor_core@ameritech.net> (raw)
In-Reply-To: <20031130090009.GA17038@ucw.cz>

On Sunday 30 November 2003 04:00 am, Vojtech Pavlik wrote:
> On Sun, Nov 30, 2003 at 03:03:57AM -0500, Dmitry Torokhov wrote:
> > If request_irq fails in i8042_open it will call
> > serio_unregister_port, which takes serio_sem. i8042_open may be
> > called:
> >
> > serio_register_port - serio_find_dev - dev->connect
> > serio_register_device - dev->connect
> >
> > Both serio_register_port and serio_register_device take serio_sem as
> > well.
> >
> > I think that serio_{register|unregister}_port can be converted into
> > submitting requests to kseriod thus removing deadlock on the
> > serio_sem.
> >
> > The patch below is on top of serio* patches in Andrew Morton's -mm
> > tree.
>
> It's nice to avoid the deadlock this way, but I think it's not a good
> idea to make the register/unregister asynchronous - it could be a nasty
> surprise for an unsuspecting driver writer.
>

Serio_register_port is not guaranteed to find a driver for the serio anyway
as the driver can be compiled as a module and loaded much much later so it
should not be a concern. It is somewhat asynchronous already.

Dmitry

  reply	other threads:[~2003-11-30  9:19 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-11-30  8:03 [2.6 RFC/PATCH] Input: possible deadlock in i8042 Dmitry Torokhov
2003-11-30  9:00 ` Vojtech Pavlik
2003-11-30  9:19   ` Dmitry Torokhov [this message]
2003-12-01  6:58   ` Dmitry Torokhov
2003-12-01  6:59   ` Dmitry Torokhov

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=200311300419.29064.dtor_core@ameritech.net \
    --to=dtor_core@ameritech.net \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=vojtech@suse.cz \
    /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).