aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRandy.Dunlap <rdunlap@xenotime.net>2006-01-11 15:17:46 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-01-11 21:42:13 -0500
commitc59ede7b78db329949d9cdcd7064e22d357560ef (patch)
treef9dc9d464fdad5bfd464d983e77c1af031389dda
parente16885c5ad624a6efe1b1bf764e075d75f65a788 (diff)
[PATCH] move capable() to capability.h
- Move capable() from sched.h to capability.h; - Use <linux/capability.h> where capable() is used (in include/, block/, ipc/, kernel/, a few drivers/, mm/, security/, & sound/; many more drivers/ to go) Signed-off-by: Randy Dunlap <rdunlap@xenotime.net> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r--block/ioctl.c2
-rw-r--r--block/scsi_ioctl.c1
-rw-r--r--drivers/acorn/char/i2c.c1
-rw-r--r--drivers/base/firmware_class.c1
-rw-r--r--drivers/base/memory.c2
-rw-r--r--drivers/firmware/efivars.c2
-rw-r--r--drivers/oprofile/event_buffer.c1
-rw-r--r--drivers/parisc/led.c1
-rw-r--r--drivers/parisc/pdc_stable.c2
-rw-r--r--fs/xfs/linux-2.6/xfs_cred.h4
-rw-r--r--include/linux/capability.h3
-rw-r--r--include/linux/mm.h1
-rw-r--r--include/linux/sched.h4
-rw-r--r--ipc/mqueue.c1
-rw-r--r--ipc/msg.c1
-rw-r--r--ipc/sem.c1
-rw-r--r--ipc/shm.c1
-rw-r--r--ipc/util.c1
-rw-r--r--kernel/acct.c1
-rw-r--r--kernel/capability.c1
-rw-r--r--kernel/exit.c1
-rw-r--r--kernel/fork.c1
-rw-r--r--kernel/kexec.c1
-rw-r--r--kernel/module.c1
-rw-r--r--kernel/ptrace.c1
-rw-r--r--kernel/sched.c1
-rw-r--r--kernel/signal.c1
-rw-r--r--kernel/sys.c1
-rw-r--r--kernel/sysctl.c1
-rw-r--r--kernel/time.c1
-rw-r--r--kernel/uid16.c1
-rw-r--r--mm/filemap.c1
-rw-r--r--mm/mlock.c1
-rw-r--r--mm/mmap.c1
-rw-r--r--mm/mremap.c1
-rw-r--r--mm/swapfile.c1
-rw-r--r--security/commoncap.c1
-rw-r--r--security/dummy.c1
-rw-r--r--security/keys/keyctl.c1
-rw-r--r--security/security.c1
-rw-r--r--sound/pci/emu10k1/emufx.c1
41 files changed, 44 insertions, 9 deletions
diff --git a/block/ioctl.c b/block/ioctl.c
index 82030e1dfd63..e1109491c234 100644
--- a/block/ioctl.c
+++ b/block/ioctl.c
@@ -1,4 +1,4 @@
1#include <linux/sched.h> /* for capable() */ 1#include <linux/capability.h>
2#include <linux/blkdev.h> 2#include <linux/blkdev.h>
3#include <linux/blkpg.h> 3#include <linux/blkpg.h>
4#include <linux/hdreg.h> 4#include <linux/hdreg.h>
diff --git a/block/scsi_ioctl.c b/block/scsi_ioctl.c
index 18de84c8ccd8..cc72210687eb 100644
--- a/block/scsi_ioctl.c
+++ b/block/scsi_ioctl.c
@@ -21,6 +21,7 @@
21#include <linux/string.h> 21#include <linux/string.h>
22#include <linux/module.h> 22#include <linux/module.h>
23#include <linux/blkdev.h> 23#include <linux/blkdev.h>
24#include <linux/capability.h>
24#include <linux/completion.h> 25#include <linux/completion.h>
25#include <linux/cdrom.h> 26#include <linux/cdrom.h>
26#include <linux/slab.h> 27#include <linux/slab.h>
diff --git a/drivers/acorn/char/i2c.c b/drivers/acorn/char/i2c.c
index c22bb9dca1ec..c26c08b36829 100644
--- a/drivers/acorn/char/i2c.c
+++ b/drivers/acorn/char/i2c.c
@@ -12,6 +12,7 @@
12 * On Acorn machines, the following i2c devices are on the bus: 12 * On Acorn machines, the following i2c devices are on the bus:
13 * - PCF8583 real time clock & static RAM 13 * - PCF8583 real time clock & static RAM
14 */ 14 */
15#include <linux/capability.h>
15#include <linux/init.h> 16#include <linux/init.h>
16#include <linux/sched.h> 17#include <linux/sched.h>
17#include <linux/time.h> 18#include <linux/time.h>
diff --git a/drivers/base/firmware_class.c b/drivers/base/firmware_class.c
index 5b3d5e9ddcb6..3d384e3d34de 100644
--- a/drivers/base/firmware_class.c
+++ b/drivers/base/firmware_class.c
@@ -7,6 +7,7 @@
7 * 7 *
8 */ 8 */
9 9
10#include <linux/capability.h>
10#include <linux/device.h> 11#include <linux/device.h>
11#include <linux/module.h> 12#include <linux/module.h>
12#include <linux/init.h> 13#include <linux/init.h>
diff --git a/drivers/base/memory.c b/drivers/base/memory.c
index 58801d718cc2..d1a05224627e 100644
--- a/drivers/base/memory.c
+++ b/drivers/base/memory.c
@@ -13,8 +13,8 @@
13#include <linux/sysdev.h> 13#include <linux/sysdev.h>
14#include <linux/module.h> 14#include <linux/module.h>
15#include <linux/init.h> 15#include <linux/init.h>
16#include <linux/sched.h> /* capable() */
17#include <linux/topology.h> 16#include <linux/topology.h>
17#include <linux/capability.h>
18#include <linux/device.h> 18#include <linux/device.h>
19#include <linux/memory.h> 19#include <linux/memory.h>
20#include <linux/kobject.h> 20#include <linux/kobject.h>
diff --git a/drivers/firmware/efivars.c b/drivers/firmware/efivars.c
index bda5bce681b6..343379f23a53 100644
--- a/drivers/firmware/efivars.c
+++ b/drivers/firmware/efivars.c
@@ -65,11 +65,11 @@
65 * v0.01 release to linux-ia64@linuxia64.org 65 * v0.01 release to linux-ia64@linuxia64.org
66 */ 66 */
67 67
68#include <linux/capability.h>
68#include <linux/config.h> 69#include <linux/config.h>
69#include <linux/types.h> 70#include <linux/types.h>
70#include <linux/errno.h> 71#include <linux/errno.h>
71#include <linux/init.h> 72#include <linux/init.h>
72#include <linux/sched.h> /* for capable() */
73#include <linux/mm.h> 73#include <linux/mm.h>
74#include <linux/module.h> 74#include <linux/module.h>
75#include <linux/string.h> 75#include <linux/string.h>
diff --git a/drivers/oprofile/event_buffer.c b/drivers/oprofile/event_buffer.c
index 166bca790133..b80318f03420 100644
--- a/drivers/oprofile/event_buffer.c
+++ b/drivers/oprofile/event_buffer.c
@@ -15,6 +15,7 @@
15#include <linux/vmalloc.h> 15#include <linux/vmalloc.h>
16#include <linux/oprofile.h> 16#include <linux/oprofile.h>
17#include <linux/sched.h> 17#include <linux/sched.h>
18#include <linux/capability.h>
18#include <linux/dcookies.h> 19#include <linux/dcookies.h>
19#include <linux/fs.h> 20#include <linux/fs.h>
20#include <asm/uaccess.h> 21#include <asm/uaccess.h>
diff --git a/drivers/parisc/led.c b/drivers/parisc/led.c
index f357d3f60360..3627a2d7f79f 100644
--- a/drivers/parisc/led.c
+++ b/drivers/parisc/led.c
@@ -30,6 +30,7 @@
30#include <linux/types.h> 30#include <linux/types.h>
31#include <linux/ioport.h> 31#include <linux/ioport.h>
32#include <linux/utsname.h> 32#include <linux/utsname.h>
33#include <linux/capability.h>
33#include <linux/delay.h> 34#include <linux/delay.h>
34#include <linux/netdevice.h> 35#include <linux/netdevice.h>
35#include <linux/inetdevice.h> 36#include <linux/inetdevice.h>
diff --git a/drivers/parisc/pdc_stable.c b/drivers/parisc/pdc_stable.c
index 38bdca2fac6b..42a3c54e8e6c 100644
--- a/drivers/parisc/pdc_stable.c
+++ b/drivers/parisc/pdc_stable.c
@@ -42,9 +42,9 @@
42 42
43#include <linux/module.h> 43#include <linux/module.h>
44#include <linux/init.h> 44#include <linux/init.h>
45#include <linux/sched.h> /* for capable() */
46#include <linux/kernel.h> 45#include <linux/kernel.h>
47#include <linux/string.h> 46#include <linux/string.h>
47#include <linux/capability.h>
48#include <linux/ctype.h> 48#include <linux/ctype.h>
49#include <linux/sysfs.h> 49#include <linux/sysfs.h>
50#include <linux/kobject.h> 50#include <linux/kobject.h>
diff --git a/fs/xfs/linux-2.6/xfs_cred.h b/fs/xfs/linux-2.6/xfs_cred.h
index 4af491024727..e7f3da61c6c3 100644
--- a/fs/xfs/linux-2.6/xfs_cred.h
+++ b/fs/xfs/linux-2.6/xfs_cred.h
@@ -18,6 +18,8 @@
18#ifndef __XFS_CRED_H__ 18#ifndef __XFS_CRED_H__
19#define __XFS_CRED_H__ 19#define __XFS_CRED_H__
20 20
21#include <linux/capability.h>
22
21/* 23/*
22 * Credentials 24 * Credentials
23 */ 25 */
@@ -27,7 +29,7 @@ typedef struct cred {
27 29
28extern struct cred *sys_cred; 30extern struct cred *sys_cred;
29 31
30/* this is a hack.. (assums sys_cred is the only cred_t in the system) */ 32/* this is a hack.. (assumes sys_cred is the only cred_t in the system) */
31static __inline int capable_cred(cred_t *cr, int cid) 33static __inline int capable_cred(cred_t *cr, int cid)
32{ 34{
33 return (cr == sys_cred) ? 1 : capable(cid); 35 return (cr == sys_cred) ? 1 : capable(cid);
diff --git a/include/linux/capability.h b/include/linux/capability.h
index 6b4618902d3d..5a23ce752629 100644
--- a/include/linux/capability.h
+++ b/include/linux/capability.h
@@ -43,6 +43,7 @@ typedef struct __user_cap_data_struct {
43#ifdef __KERNEL__ 43#ifdef __KERNEL__
44 44
45#include <linux/spinlock.h> 45#include <linux/spinlock.h>
46#include <asm/current.h>
46 47
47/* #define STRICT_CAP_T_TYPECHECKS */ 48/* #define STRICT_CAP_T_TYPECHECKS */
48 49
@@ -356,6 +357,8 @@ static inline kernel_cap_t cap_invert(kernel_cap_t c)
356 357
357#define cap_is_fs_cap(c) (CAP_TO_MASK(c) & CAP_FS_MASK) 358#define cap_is_fs_cap(c) (CAP_TO_MASK(c) & CAP_FS_MASK)
358 359
360extern int capable(int cap);
361
359#endif /* __KERNEL__ */ 362#endif /* __KERNEL__ */
360 363
361#endif /* !_LINUX_CAPABILITY_H */ 364#endif /* !_LINUX_CAPABILITY_H */
diff --git a/include/linux/mm.h b/include/linux/mm.h
index e53d2c6fd5f4..c643016499a1 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -3,6 +3,7 @@
3 3
4#include <linux/sched.h> 4#include <linux/sched.h>
5#include <linux/errno.h> 5#include <linux/errno.h>
6#include <linux/capability.h>
6 7
7#ifdef __KERNEL__ 8#ifdef __KERNEL__
8 9
diff --git a/include/linux/sched.h b/include/linux/sched.h
index 2ae8711bfba1..3b74c4bf2934 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -1112,10 +1112,6 @@ static inline int sas_ss_flags(unsigned long sp)
1112 : on_sig_stack(sp) ? SS_ONSTACK : 0); 1112 : on_sig_stack(sp) ? SS_ONSTACK : 0);
1113} 1113}
1114 1114
1115
1116/* code is in security.c or kernel/sys.c if !SECURITY */
1117extern int capable(int cap);
1118
1119/* 1115/*
1120 * Routines for handling mm_structs 1116 * Routines for handling mm_structs
1121 */ 1117 */
diff --git a/ipc/mqueue.c b/ipc/mqueue.c
index a8aa6152eea6..4e776f9c80e7 100644
--- a/ipc/mqueue.c
+++ b/ipc/mqueue.c
@@ -11,6 +11,7 @@
11 * This file is released under the GPL. 11 * This file is released under the GPL.
12 */ 12 */
13 13
14#include <linux/capability.h>
14#include <linux/init.h> 15#include <linux/init.h>
15#include <linux/pagemap.h> 16#include <linux/pagemap.h>
16#include <linux/file.h> 17#include <linux/file.h>
diff --git a/ipc/msg.c b/ipc/msg.c
index d035bd2aba96..a91b64763b86 100644
--- a/ipc/msg.c
+++ b/ipc/msg.c
@@ -15,6 +15,7 @@
15 * (c) 1999 Manfred Spraul <manfreds@colorfullife.com> 15 * (c) 1999 Manfred Spraul <manfreds@colorfullife.com>
16 */ 16 */
17 17
18#include <linux/capability.h>
18#include <linux/config.h> 19#include <linux/config.h>
19#include <linux/slab.h> 20#include <linux/slab.h>
20#include <linux/msg.h> 21#include <linux/msg.h>
diff --git a/ipc/sem.c b/ipc/sem.c
index cb5bb2a5df96..46bb8a678dec 100644
--- a/ipc/sem.c
+++ b/ipc/sem.c
@@ -73,6 +73,7 @@
73#include <linux/security.h> 73#include <linux/security.h>
74#include <linux/syscalls.h> 74#include <linux/syscalls.h>
75#include <linux/audit.h> 75#include <linux/audit.h>
76#include <linux/capability.h>
76#include <linux/seq_file.h> 77#include <linux/seq_file.h>
77#include <asm/uaccess.h> 78#include <asm/uaccess.h>
78#include "util.h" 79#include "util.h"
diff --git a/ipc/shm.c b/ipc/shm.c
index 0b92e874fc06..4c28d2d8e305 100644
--- a/ipc/shm.c
+++ b/ipc/shm.c
@@ -27,6 +27,7 @@
27#include <linux/security.h> 27#include <linux/security.h>
28#include <linux/syscalls.h> 28#include <linux/syscalls.h>
29#include <linux/audit.h> 29#include <linux/audit.h>
30#include <linux/capability.h>
30#include <linux/ptrace.h> 31#include <linux/ptrace.h>
31#include <linux/seq_file.h> 32#include <linux/seq_file.h>
32 33
diff --git a/ipc/util.c b/ipc/util.c
index 23f1cec150c1..38b9a0af3bd8 100644
--- a/ipc/util.c
+++ b/ipc/util.c
@@ -20,6 +20,7 @@
20#include <linux/smp_lock.h> 20#include <linux/smp_lock.h>
21#include <linux/vmalloc.h> 21#include <linux/vmalloc.h>
22#include <linux/slab.h> 22#include <linux/slab.h>
23#include <linux/capability.h>
23#include <linux/highuid.h> 24#include <linux/highuid.h>
24#include <linux/security.h> 25#include <linux/security.h>
25#include <linux/rcupdate.h> 26#include <linux/rcupdate.h>
diff --git a/kernel/acct.c b/kernel/acct.c
index 38d57fa6b78f..065d8b4e51ef 100644
--- a/kernel/acct.c
+++ b/kernel/acct.c
@@ -47,6 +47,7 @@
47#include <linux/mm.h> 47#include <linux/mm.h>
48#include <linux/slab.h> 48#include <linux/slab.h>
49#include <linux/acct.h> 49#include <linux/acct.h>
50#include <linux/capability.h>
50#include <linux/file.h> 51#include <linux/file.h>
51#include <linux/tty.h> 52#include <linux/tty.h>
52#include <linux/security.h> 53#include <linux/security.h>
diff --git a/kernel/capability.c b/kernel/capability.c
index 8986a37a67ea..bfa3c92e16f2 100644
--- a/kernel/capability.c
+++ b/kernel/capability.c
@@ -7,6 +7,7 @@
7 * 30 May 2002: Cleanup, Robert M. Love <rml@tech9.net> 7 * 30 May 2002: Cleanup, Robert M. Love <rml@tech9.net>
8 */ 8 */
9 9
10#include <linux/capability.h>
10#include <linux/mm.h> 11#include <linux/mm.h>
11#include <linux/module.h> 12#include <linux/module.h>
12#include <linux/security.h> 13#include <linux/security.h>
diff --git a/kernel/exit.c b/kernel/exit.c
index 802722814925..f8e609ff1893 100644
--- a/kernel/exit.c
+++ b/kernel/exit.c
@@ -10,6 +10,7 @@
10#include <linux/interrupt.h> 10#include <linux/interrupt.h>
11#include <linux/smp_lock.h> 11#include <linux/smp_lock.h>
12#include <linux/module.h> 12#include <linux/module.h>
13#include <linux/capability.h>
13#include <linux/completion.h> 14#include <linux/completion.h>
14#include <linux/personality.h> 15#include <linux/personality.h>
15#include <linux/tty.h> 16#include <linux/tty.h>
diff --git a/kernel/fork.c b/kernel/fork.c
index 3bdcab49998d..16a776ec2c0b 100644
--- a/kernel/fork.c
+++ b/kernel/fork.c
@@ -28,6 +28,7 @@
28#include <linux/binfmts.h> 28#include <linux/binfmts.h>
29#include <linux/mman.h> 29#include <linux/mman.h>
30#include <linux/fs.h> 30#include <linux/fs.h>
31#include <linux/capability.h>
31#include <linux/cpu.h> 32#include <linux/cpu.h>
32#include <linux/cpuset.h> 33#include <linux/cpuset.h>
33#include <linux/security.h> 34#include <linux/security.h>
diff --git a/kernel/kexec.c b/kernel/kexec.c
index de1441656efd..bf39d28e4c0e 100644
--- a/kernel/kexec.c
+++ b/kernel/kexec.c
@@ -6,6 +6,7 @@
6 * Version 2. See the file COPYING for more details. 6 * Version 2. See the file COPYING for more details.
7 */ 7 */
8 8
9#include <linux/capability.h>
9#include <linux/mm.h> 10#include <linux/mm.h>
10#include <linux/file.h> 11#include <linux/file.h>
11#include <linux/slab.h> 12#include <linux/slab.h>
diff --git a/kernel/module.c b/kernel/module.c
index e4276046a1b6..618ed6e23ecc 100644
--- a/kernel/module.c
+++ b/kernel/module.c
@@ -28,6 +28,7 @@
28#include <linux/syscalls.h> 28#include <linux/syscalls.h>
29#include <linux/fcntl.h> 29#include <linux/fcntl.h>
30#include <linux/rcupdate.h> 30#include <linux/rcupdate.h>
31#include <linux/capability.h>
31#include <linux/cpu.h> 32#include <linux/cpu.h>
32#include <linux/moduleparam.h> 33#include <linux/moduleparam.h>
33#include <linux/errno.h> 34#include <linux/errno.h>
diff --git a/kernel/ptrace.c b/kernel/ptrace.c
index cceaf09ac413..5f33cdb6fff5 100644
--- a/kernel/ptrace.c
+++ b/kernel/ptrace.c
@@ -7,6 +7,7 @@
7 * to continually duplicate across every architecture. 7 * to continually duplicate across every architecture.
8 */ 8 */
9 9
10#include <linux/capability.h>
10#include <linux/module.h> 11#include <linux/module.h>
11#include <linux/sched.h> 12#include <linux/sched.h>
12#include <linux/errno.h> 13#include <linux/errno.h>
diff --git a/kernel/sched.c b/kernel/sched.c
index 34a945bcc022..d129e560cc0d 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -27,6 +27,7 @@
27#include <linux/smp_lock.h> 27#include <linux/smp_lock.h>
28#include <asm/mmu_context.h> 28#include <asm/mmu_context.h>
29#include <linux/interrupt.h> 29#include <linux/interrupt.h>
30#include <linux/capability.h>
30#include <linux/completion.h> 31#include <linux/completion.h>
31#include <linux/kernel_stat.h> 32#include <linux/kernel_stat.h>
32#include <linux/security.h> 33#include <linux/security.h>
diff --git a/kernel/signal.c b/kernel/signal.c
index 08aa5b263f36..1da2e74beb97 100644
--- a/kernel/signal.c
+++ b/kernel/signal.c
@@ -25,6 +25,7 @@
25#include <linux/posix-timers.h> 25#include <linux/posix-timers.h>
26#include <linux/signal.h> 26#include <linux/signal.h>
27#include <linux/audit.h> 27#include <linux/audit.h>
28#include <linux/capability.h>
28#include <asm/param.h> 29#include <asm/param.h>
29#include <asm/uaccess.h> 30#include <asm/uaccess.h>
30#include <asm/unistd.h> 31#include <asm/unistd.h>
diff --git a/kernel/sys.c b/kernel/sys.c
index 9ccf713491f9..d09cac23fdfd 100644
--- a/kernel/sys.c
+++ b/kernel/sys.c
@@ -19,6 +19,7 @@
19#include <linux/kernel.h> 19#include <linux/kernel.h>
20#include <linux/kexec.h> 20#include <linux/kexec.h>
21#include <linux/workqueue.h> 21#include <linux/workqueue.h>
22#include <linux/capability.h>
22#include <linux/device.h> 23#include <linux/device.h>
23#include <linux/key.h> 24#include <linux/key.h>
24#include <linux/times.h> 25#include <linux/times.h>
diff --git a/kernel/sysctl.c b/kernel/sysctl.c
index 03b0598f2369..62d4d9566876 100644
--- a/kernel/sysctl.c
+++ b/kernel/sysctl.c
@@ -25,6 +25,7 @@
25#include <linux/slab.h> 25#include <linux/slab.h>
26#include <linux/sysctl.h> 26#include <linux/sysctl.h>
27#include <linux/proc_fs.h> 27#include <linux/proc_fs.h>
28#include <linux/capability.h>
28#include <linux/ctype.h> 29#include <linux/ctype.h>
29#include <linux/utsname.h> 30#include <linux/utsname.h>
30#include <linux/capability.h> 31#include <linux/capability.h>
diff --git a/kernel/time.c b/kernel/time.c
index 169e8329e0b6..7477b1d2079e 100644
--- a/kernel/time.c
+++ b/kernel/time.c
@@ -29,6 +29,7 @@
29 29
30#include <linux/module.h> 30#include <linux/module.h>
31#include <linux/timex.h> 31#include <linux/timex.h>
32#include <linux/capability.h>
32#include <linux/errno.h> 33#include <linux/errno.h>
33#include <linux/smp_lock.h> 34#include <linux/smp_lock.h>
34#include <linux/syscalls.h> 35#include <linux/syscalls.h>
diff --git a/kernel/uid16.c b/kernel/uid16.c
index f669941e8b26..aa25605027c8 100644
--- a/kernel/uid16.c
+++ b/kernel/uid16.c
@@ -10,6 +10,7 @@
10#include <linux/notifier.h> 10#include <linux/notifier.h>
11#include <linux/reboot.h> 11#include <linux/reboot.h>
12#include <linux/prctl.h> 12#include <linux/prctl.h>
13#include <linux/capability.h>
13#include <linux/init.h> 14#include <linux/init.h>
14#include <linux/highuid.h> 15#include <linux/highuid.h>
15#include <linux/security.h> 16#include <linux/security.h>
diff --git a/mm/filemap.c b/mm/filemap.c
index 96de772be487..a965b6b35f26 100644
--- a/mm/filemap.c
+++ b/mm/filemap.c
@@ -15,6 +15,7 @@
15#include <linux/compiler.h> 15#include <linux/compiler.h>
16#include <linux/fs.h> 16#include <linux/fs.h>
17#include <linux/aio.h> 17#include <linux/aio.h>
18#include <linux/capability.h>
18#include <linux/kernel_stat.h> 19#include <linux/kernel_stat.h>
19#include <linux/mm.h> 20#include <linux/mm.h>
20#include <linux/swap.h> 21#include <linux/swap.h>
diff --git a/mm/mlock.c b/mm/mlock.c
index 4ae3a46ff768..b90c59573abf 100644
--- a/mm/mlock.c
+++ b/mm/mlock.c
@@ -5,6 +5,7 @@
5 * (C) Copyright 2002 Christoph Hellwig 5 * (C) Copyright 2002 Christoph Hellwig
6 */ 6 */
7 7
8#include <linux/capability.h>
8#include <linux/mman.h> 9#include <linux/mman.h>
9#include <linux/mm.h> 10#include <linux/mm.h>
10#include <linux/mempolicy.h> 11#include <linux/mempolicy.h>
diff --git a/mm/mmap.c b/mm/mmap.c
index 64ba4dbcb7de..47556d2b3e90 100644
--- a/mm/mmap.c
+++ b/mm/mmap.c
@@ -13,6 +13,7 @@
13#include <linux/pagemap.h> 13#include <linux/pagemap.h>
14#include <linux/swap.h> 14#include <linux/swap.h>
15#include <linux/syscalls.h> 15#include <linux/syscalls.h>
16#include <linux/capability.h>
16#include <linux/init.h> 17#include <linux/init.h>
17#include <linux/file.h> 18#include <linux/file.h>
18#include <linux/fs.h> 19#include <linux/fs.h>
diff --git a/mm/mremap.c b/mm/mremap.c
index ddaeee9a0b69..1903bdf65e42 100644
--- a/mm/mremap.c
+++ b/mm/mremap.c
@@ -13,6 +13,7 @@
13#include <linux/shm.h> 13#include <linux/shm.h>
14#include <linux/mman.h> 14#include <linux/mman.h>
15#include <linux/swap.h> 15#include <linux/swap.h>
16#include <linux/capability.h>
16#include <linux/fs.h> 17#include <linux/fs.h>
17#include <linux/highmem.h> 18#include <linux/highmem.h>
18#include <linux/security.h> 19#include <linux/security.h>
diff --git a/mm/swapfile.c b/mm/swapfile.c
index d8a5afc8b2a3..957fef43fa60 100644
--- a/mm/swapfile.c
+++ b/mm/swapfile.c
@@ -25,6 +25,7 @@
25#include <linux/rmap.h> 25#include <linux/rmap.h>
26#include <linux/security.h> 26#include <linux/security.h>
27#include <linux/backing-dev.h> 27#include <linux/backing-dev.h>
28#include <linux/capability.h>
28#include <linux/syscalls.h> 29#include <linux/syscalls.h>
29 30
30#include <asm/pgtable.h> 31#include <asm/pgtable.h>
diff --git a/security/commoncap.c b/security/commoncap.c
index 04c12f58d656..8a6e097f99ea 100644
--- a/security/commoncap.c
+++ b/security/commoncap.c
@@ -7,6 +7,7 @@
7 * 7 *
8 */ 8 */
9 9
10#include <linux/capability.h>
10#include <linux/config.h> 11#include <linux/config.h>
11#include <linux/module.h> 12#include <linux/module.h>
12#include <linux/init.h> 13#include <linux/init.h>
diff --git a/security/dummy.c b/security/dummy.c
index a15c54709fde..f1a5bd98bf10 100644
--- a/security/dummy.c
+++ b/security/dummy.c
@@ -14,6 +14,7 @@
14 14
15#undef DEBUG 15#undef DEBUG
16 16
17#include <linux/capability.h>
17#include <linux/config.h> 18#include <linux/config.h>
18#include <linux/module.h> 19#include <linux/module.h>
19#include <linux/kernel.h> 20#include <linux/kernel.h>
diff --git a/security/keys/keyctl.c b/security/keys/keyctl.c
index 3d2ebae029c1..90db5c76cf6e 100644
--- a/security/keys/keyctl.c
+++ b/security/keys/keyctl.c
@@ -16,6 +16,7 @@
16#include <linux/syscalls.h> 16#include <linux/syscalls.h>
17#include <linux/keyctl.h> 17#include <linux/keyctl.h>
18#include <linux/fs.h> 18#include <linux/fs.h>
19#include <linux/capability.h>
19#include <linux/err.h> 20#include <linux/err.h>
20#include <asm/uaccess.h> 21#include <asm/uaccess.h>
21#include "internal.h" 22#include "internal.h"
diff --git a/security/security.c b/security/security.c
index ed5fb80769c3..f693e1f66b98 100644
--- a/security/security.c
+++ b/security/security.c
@@ -11,6 +11,7 @@
11 * (at your option) any later version. 11 * (at your option) any later version.
12 */ 12 */
13 13
14#include <linux/capability.h>
14#include <linux/config.h> 15#include <linux/config.h>
15#include <linux/module.h> 16#include <linux/module.h>
16#include <linux/init.h> 17#include <linux/init.h>
diff --git a/sound/pci/emu10k1/emufx.c b/sound/pci/emu10k1/emufx.c
index 1a903390ad6d..509837252735 100644
--- a/sound/pci/emu10k1/emufx.c
+++ b/sound/pci/emu10k1/emufx.c
@@ -27,6 +27,7 @@
27 27
28#include <sound/driver.h> 28#include <sound/driver.h>
29#include <linux/pci.h> 29#include <linux/pci.h>
30#include <linux/capability.h>
30#include <linux/delay.h> 31#include <linux/delay.h>
31#include <linux/slab.h> 32#include <linux/slab.h>
32#include <linux/vmalloc.h> 33#include <linux/vmalloc.h>