瀏覽代碼

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>
Matthew Wilcox 17 年之前
父節點
當前提交
e48b3deee4
共有 1 個文件被更改,包括 1 次插入0 次删除
  1. 1 0
      lib/kernel_lock.c

+ 1 - 0
lib/kernel_lock.c

@@ -8,6 +8,7 @@
 #include <linux/smp_lock.h>
 #include <linux/module.h>
 #include <linux/kallsyms.h>
+#include <asm/semaphore.h>
 
 /*
  * The 'big kernel semaphore'