Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[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>

authored by

Arthur Othieno and committed by
Linus Torvalds
aa3a6f45 23f88fe4

+1
+1
include/asm-xtensa/semaphore.h
··· 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