From: "Dmitry Torokhov" <dmitry.torokhov@gmail.com>
To: "Jiri Kosina" <jikos@jikos.cz>
Cc: "Andrew Morton" <akpm@osdl.org>,
lkml <linux-kernel@vger.kernel.org>,
"Arjan van de Ven" <arjan@infradead.org>,
"Dave Jones" <davej@redhat.com>
Subject: Re: [PATCH 0/3] Synaptics - fix lockdep warnings
Date: Thu, 14 Sep 2006 09:18:22 -0400 [thread overview]
Message-ID: <d120d5000609140618h6e929883u2ed82d1cab677e57@mail.gmail.com> (raw)
In-Reply-To: <Pine.LNX.4.64.0609141028540.22181@twin.jikos.cz>
On 9/14/06, Jiri Kosina <jikos@jikos.cz> wrote:
> On Wed, 13 Sep 2006, Dmitry Torokhov wrote:
>
> > Unfortunately these patches do not solve the problem in general but
> > rather fix one specific codepath. As far as I can see the warnings will
> > return as soon as we add another pass-through port to the link (and I am
> > considering adding a pass-through port to the trackpoint driver so you
> > will get chain like i8042-synaptics-ptport-trackpoint-ptport-psmouse).
> > Plus they are ugly and complicate serio and psmouse cores. I really
> > don't like this *_nested business as it makes the code aware of possible
> > usage patterns instead of just being re-entrant.
>
> Hi Dmitry,
>
> I agree that these patches are ugly, but I wasn't able to think of any
> other way how to get rid of those lockdep warnings.
>
> Of course the lock validator could be extended to provide API such as
> mutex_init_nolockdep(), as you already proposed before, but this also has
> it's drawbacks (for example if any other future user of ps2_init() uses
> the mutex in a really bad way, this would not be detected by lock
> validator).
>
> Another possibility that comes to mind is extending the ps2dev structure
> with a field which would work as an subclass identifier for the device,
> and this field will be then be used as an subclass argument to
> mutex_lock_nested(). However, this requires proper setting of this field
> on the very same places on which my _nested functions are called, so it
> has the same level of generality.
>
Can we add lock_class_key to the struct psmouse and use it to define
per-device mutex class regardless of whether it is a child, grandchild
or a parent?
> Do you have any other idea? I think this should get fixed, otherwise we
> will keep receiving these reports from users again and again.
>
If we can't make lockdep shut up with minimal intervention I might
just change psmouse back to semaphores.
--
Dmitry
next prev parent reply other threads:[~2006-09-14 13:18 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-09-14 0:44 Jiri Kosina
2006-09-14 0:44 ` [PATCH 1/3] " Jiri Kosina
2006-09-14 0:44 ` [PATCH 2/3] " Jiri Kosina
2006-09-14 0:44 ` [PATCH 3/3] " Jiri Kosina
2006-09-14 2:00 ` [PATCH 0/3] " Dmitry Torokhov
2006-09-14 8:43 ` Jiri Kosina
2006-09-14 13:18 ` Dmitry Torokhov [this message]
2006-09-14 14:39 ` Jiri Kosina
2006-09-14 14:58 ` Dmitry Torokhov
2006-09-14 15:03 ` Arjan van de Ven
2006-09-14 15:08 ` Jiri Kosina
2006-09-14 15:51 ` Dmitry Torokhov
2006-09-14 16:00 ` Jiri Kosina
2006-09-14 16:18 ` Dmitry Torokhov
2006-09-14 18:48 ` Jiri Kosina
2006-09-14 18:56 ` Dmitry Torokhov
2006-09-14 19:03 ` Arjan van de Ven
2006-09-14 19:11 ` Dmitry Torokhov
2006-09-15 5:33 ` Arjan van de Ven
2006-09-15 13:20 ` Dmitry Torokhov
2006-09-15 13:38 ` Jiri Kosina
2006-09-15 13:51 ` Dmitry Torokhov
2006-09-15 13:56 ` Dmitry Torokhov
2006-09-14 19:56 ` Ingo Molnar
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=d120d5000609140618h6e929883u2ed82d1cab677e57@mail.gmail.com \
--to=dmitry.torokhov@gmail.com \
--cc=akpm@osdl.org \
--cc=arjan@infradead.org \
--cc=davej@redhat.com \
--cc=jikos@jikos.cz \
--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
all inboxes | Powered by JetHome®