From: Arnd Bergmann <arnd@arndb.de>
To: Valdis.Kletnieks@vt.edu
Cc: linux-kernel@vger.kernel.org
Subject: Re: Stupid lockdep question...
Date: Wed, 13 Oct 2010 17:43:00 +0200 [thread overview]
Message-ID: <201010131743.00275.arnd@arndb.de> (raw)
In-Reply-To: <38780.1286984249@localhost>
On Wednesday 13 October 2010, Valdis.Kletnieks@vt.edu wrote:
> I have a 3rd-party module, that throws this whinge:
>
> [ 65.831296] INFO: trying to register non-static key.
> [ 65.831301] the code is fine but needs lockdep annotation.
> [ 65.831303] turning off the locking correctness validator.
>
> I've identified that it's a call to down(*foo) where foo points to a kmalloc'ed
> block of memory that's memset() to all-zeros. What's the initializer/annotation
> I need to add to my code?
>
It would be easier if you posted a link to the source, but the best
answer is problably:
- replace the semaphore with a regular mutex,
- use mutex_init to initialize it after the allocation.
Arnd
prev parent reply other threads:[~2010-10-13 15:42 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-13 15:37 Valdis.Kletnieks
2010-10-13 15:43 ` Arnd Bergmann [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=201010131743.00275.arnd@arndb.de \
--to=arnd@arndb.de \
--cc=Valdis.Kletnieks@vt.edu \
--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
Powered by JetHome