The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Dmitry Torokhov <dtor_core@ameritech.net>
To: Arjan van de Ven <arjan@infradead.org>
Cc: Faidon Liambotis <faidon@cube.gr>, Ingo Molnar <mingo@elte.hu>,
	linux-kernel@vger.kernel.org
Subject: Re: [patch 2.6.15-mm4] sem2mutex: drivers/input/, #2
Date: Sat, 14 Jan 2006 12:01:08 -0500	[thread overview]
Message-ID: <200601141201.08478.dtor_core@ameritech.net> (raw)
In-Reply-To: <1137257628.3014.40.camel@laptopd505.fenrus.org>

On Saturday 14 January 2006 11:53, Arjan van de Ven wrote:
> On Sat, 2006-01-14 at 11:43 -0500, Dmitry Torokhov wrote:
> > On Saturday 14 January 2006 11:21, Faidon Liambotis wrote:
> > > Ingo Molnar wrote:
> > > > @@ -1371,11 +1373,11 @@ static ssize_t psmouse_attr_set_protocol
> > > >  			return -EIO;
> > > >  		}
> > > >  
> > > > -		up(&psmouse_sem);
> > > > +		mutex_unlock(&psmouse_mutex);
> > > >  		serio_unpin_driver(serio);
> > > >  		serio_unregister_child_port(serio);
> > > >  		serio_pin_driver_uninterruptible(serio);
> > > > -		down(&psmouse_sem);
> > > > +		mutex_lock(&psmouse_mutex);
> > > Isn't that supposed to be the other way around?
> > > 
> > 
> > No, that's correct. We temporarily dropping the lock to let the serio core
> > do its job and then reaqcuire it again to finish what we were doing. 
> 
> are you REALLY sure? It looks to me as if this function is called from
> sysfs.. so you don't know that you have the lock...
>

Yes, I am sure, the sysfs helper does acquire that lock. See 

	drivers/input/mouse/psmouse-base.c::psmouse_attr_set_helper()

-- 
Dmitry

  reply	other threads:[~2006-01-14 17:01 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-01-14 16:02 [patch 2.6.15-mm4] sem2mutex: drivers/input/, #2 Ingo Molnar
2006-01-14 16:21 ` Faidon Liambotis
2006-01-14 16:43   ` Dmitry Torokhov
2006-01-14 16:53     ` Arjan van de Ven
2006-01-14 17:01       ` Dmitry Torokhov [this message]
2006-01-14 16:21 ` Dmitry Torokhov
2006-01-14 16:49   ` Arjan van de Ven
2006-01-14 17:03     ` Dmitry Torokhov
2006-01-14 17:11       ` Arjan van de Ven
2006-01-14 17:14         ` 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=200601141201.08478.dtor_core@ameritech.net \
    --to=dtor_core@ameritech.net \
    --cc=arjan@infradead.org \
    --cc=faidon@cube.gr \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    /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