All of lore.kernel.org
 help / color / mirror / Atom feed
* Stupid lockdep question...
@ 2010-10-13 15:37 Valdis.Kletnieks
  2010-10-13 15:43 ` Arnd Bergmann
  0 siblings, 1 reply; 2+ messages in thread
From: Valdis.Kletnieks @ 2010-10-13 15:37 UTC (permalink / raw)
  To: linux-kernel

[-- Attachment #1: Type: text/plain, Size: 421 bytes --]

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?


[-- Attachment #2: Type: application/pgp-signature, Size: 227 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Stupid lockdep question...
  2010-10-13 15:37 Stupid lockdep question Valdis.Kletnieks
@ 2010-10-13 15:43 ` Arnd Bergmann
  0 siblings, 0 replies; 2+ messages in thread
From: Arnd Bergmann @ 2010-10-13 15:43 UTC (permalink / raw)
  To: Valdis.Kletnieks; +Cc: linux-kernel

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-10-13 15:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-13 15:37 Stupid lockdep question Valdis.Kletnieks
2010-10-13 15:43 ` Arnd Bergmann

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.