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

Add semaphore.h to kernel_lock.c

kernel_lock.c uses DECLARE_MUTEX, up() and down() without explicitly
including asm/semaphore.h. This is fragile and leaves it vulnerable
to breakage during header reorganisations.

Signed-off-by: Matthew Wilcox <willy@linux.intel.com>

authored by

Matthew Wilcox and committed by
Matthew Wilcox
e48b3dee 8b91de2e

+1
+1
lib/kernel_lock.c
··· 8 8 #include <linux/smp_lock.h> 9 9 #include <linux/module.h> 10 10 #include <linux/kallsyms.h> 11 + #include <asm/semaphore.h> 11 12 12 13 /* 13 14 * The 'big kernel semaphore'