[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <201010131743.00275.arnd@arndb.de>
Date: Wed, 13 Oct 2010 17:43:00 +0200
From: Arnd Bergmann <arnd@...db.de>
To: Valdis.Kletnieks@...edu
Cc: linux-kernel@...r.kernel.org
Subject: Re: Stupid lockdep question...
On Wednesday 13 October 2010, Valdis.Kletnieks@...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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists