Commit aa3a6f456f6ca162d3406a6e2c09a5c928833e4f

Authored by Arthur Othieno
Committed by Linus Torvalds
1 parent 23f88fe4bf

[PATCH] xtensa: struct semaphore.sleepers initialization

No one may sleep on us until we've been down()'d.  So on allocation,
initialize `sleepers' to 0, just like everyone else does.

Signed-off-by: Arthur Othieno <a.othieno@bluewin.ch>
Acked-by: Christian Zankel <chris@zankel.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>

Showing 1 changed file with 1 additions and 0 deletions Side-by-side Diff

include/asm-xtensa/semaphore.h
... ... @@ -38,6 +38,7 @@
38 38 static inline void sema_init (struct semaphore *sem, int val)
39 39 {
40 40 atomic_set(&sem->count, val);
  41 + sem->sleepers = 0;
41 42 init_waitqueue_head(&sem->wait);
42 43 }
43 44