diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2014-06-06 19:35:10 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-06-06 19:35:10 -0400 |
commit | 57d326169e878a1a37b2bccd1cf81f6809ee67b9 (patch) | |
tree | 86ed74ae4dc2beaebce1c67b8459f1873b777d3a /include/linux | |
parent | 7b215de3d0abbc4f6daf2efd19e8809af0564490 (diff) | |
parent | 0244756edc4b98c129e92c7061d9f383708cf786 (diff) |
Merge branch 'akpm' (patches from Andrew Morton) into next
Merge more updates from Andrew Morton:
- Most of the rest of MM.
This includes "mark remap_file_pages syscall as deprecated" but the
actual "replace remap_file_pages syscall with emulation" is held
back. I guess we'll need to work out when to pull the trigger on
that one.
- various minor cleanups to obscure filesystems
- the drivers/rtc queue
- hfsplus updates
- ufs, hpfs, fatfs, affs, reiserfs
- Documentation/
- signals
- procfs
- cpu hotplug
- lib/idr.c
- rapidio
- sysctl
- ipc updates
* emailed patches from Andrew Morton <akpm@linux-foundation.org>: (171 commits)
ufs: sb mutex merge + mutex_destroy
powerpc: update comments for generic idle conversion
cris: update comments for generic idle conversion
idle: remove cpu_idle() forward declarations
nbd: zero from and len fields in NBD_CMD_DISCONNECT.
mm: convert some level-less printks to pr_*
MAINTAINERS: adi-buildroot-devel is moderated
MAINTAINERS: add linux-api for review of API/ABI changes
mm/kmemleak-test.c: use pr_fmt for logging
fs/dlm/debug_fs.c: replace seq_printf by seq_puts
fs/dlm/lockspace.c: convert simple_str to kstr
fs/dlm/config.c: convert simple_str to kstr
mm: mark remap_file_pages() syscall as deprecated
mm: memcontrol: remove unnecessary memcg argument from soft limit functions
mm: memcontrol: clean up memcg zoneinfo lookup
mm/memblock.c: call kmemleak directly from memblock_(alloc|free)
mm/mempool.c: update the kmemleak stack trace for mempool allocations
lib/radix-tree.c: update the kmemleak stack trace for radix tree allocations
mm: introduce kmemleak_update_trace()
mm/kmemleak.c: use %u to print ->checksum
...
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/cpu.h | 1 | ||||
-rw-r--r-- | include/linux/idr.h | 13 | ||||
-rw-r--r-- | include/linux/key.h | 2 | ||||
-rw-r--r-- | include/linux/kmemleak.h | 4 | ||||
-rw-r--r-- | include/linux/mc146818rtc.h | 4 | ||||
-rw-r--r-- | include/linux/ptrace.h | 32 | ||||
-rw-r--r-- | include/linux/sched.h | 3 | ||||
-rw-r--r-- | include/linux/shm.h | 3 | ||||
-rw-r--r-- | include/linux/signal.h | 21 | ||||
-rw-r--r-- | include/linux/smp.h | 2 |
10 files changed, 66 insertions, 19 deletions
diff --git a/include/linux/cpu.h b/include/linux/cpu.h index 81887120395c..95978ad7fcdd 100644 --- a/include/linux/cpu.h +++ b/include/linux/cpu.h | |||
@@ -256,7 +256,6 @@ enum cpuhp_state { | |||
256 | }; | 256 | }; |
257 | 257 | ||
258 | void cpu_startup_entry(enum cpuhp_state state); | 258 | void cpu_startup_entry(enum cpuhp_state state); |
259 | void cpu_idle(void); | ||
260 | 259 | ||
261 | void cpu_idle_poll_ctrl(bool enable); | 260 | void cpu_idle_poll_ctrl(bool enable); |
262 | 261 | ||
diff --git a/include/linux/idr.h b/include/linux/idr.h index 6af3400b9b2f..013fd9bc4cb6 100644 --- a/include/linux/idr.h +++ b/include/linux/idr.h | |||
@@ -29,21 +29,24 @@ | |||
29 | 29 | ||
30 | struct idr_layer { | 30 | struct idr_layer { |
31 | int prefix; /* the ID prefix of this idr_layer */ | 31 | int prefix; /* the ID prefix of this idr_layer */ |
32 | DECLARE_BITMAP(bitmap, IDR_SIZE); /* A zero bit means "space here" */ | 32 | int layer; /* distance from leaf */ |
33 | struct idr_layer __rcu *ary[1<<IDR_BITS]; | 33 | struct idr_layer __rcu *ary[1<<IDR_BITS]; |
34 | int count; /* When zero, we can release it */ | 34 | int count; /* When zero, we can release it */ |
35 | int layer; /* distance from leaf */ | 35 | union { |
36 | struct rcu_head rcu_head; | 36 | /* A zero bit means "space here" */ |
37 | DECLARE_BITMAP(bitmap, IDR_SIZE); | ||
38 | struct rcu_head rcu_head; | ||
39 | }; | ||
37 | }; | 40 | }; |
38 | 41 | ||
39 | struct idr { | 42 | struct idr { |
40 | struct idr_layer __rcu *hint; /* the last layer allocated from */ | 43 | struct idr_layer __rcu *hint; /* the last layer allocated from */ |
41 | struct idr_layer __rcu *top; | 44 | struct idr_layer __rcu *top; |
42 | struct idr_layer *id_free; | ||
43 | int layers; /* only valid w/o concurrent changes */ | 45 | int layers; /* only valid w/o concurrent changes */ |
44 | int id_free_cnt; | ||
45 | int cur; /* current pos for cyclic allocation */ | 46 | int cur; /* current pos for cyclic allocation */ |
46 | spinlock_t lock; | 47 | spinlock_t lock; |
48 | int id_free_cnt; | ||
49 | struct idr_layer *id_free; | ||
47 | }; | 50 | }; |
48 | 51 | ||
49 | #define IDR_INIT(name) \ | 52 | #define IDR_INIT(name) \ |
diff --git a/include/linux/key.h b/include/linux/key.h index 80d677483e31..3ae45f09589b 100644 --- a/include/linux/key.h +++ b/include/linux/key.h | |||
@@ -332,7 +332,7 @@ do { \ | |||
332 | } while (0) | 332 | } while (0) |
333 | 333 | ||
334 | #ifdef CONFIG_SYSCTL | 334 | #ifdef CONFIG_SYSCTL |
335 | extern ctl_table key_sysctls[]; | 335 | extern struct ctl_table key_sysctls[]; |
336 | #endif | 336 | #endif |
337 | /* | 337 | /* |
338 | * the userspace interface | 338 | * the userspace interface |
diff --git a/include/linux/kmemleak.h b/include/linux/kmemleak.h index 5bb424659c04..057e95971014 100644 --- a/include/linux/kmemleak.h +++ b/include/linux/kmemleak.h | |||
@@ -30,6 +30,7 @@ extern void kmemleak_alloc_percpu(const void __percpu *ptr, size_t size) __ref; | |||
30 | extern void kmemleak_free(const void *ptr) __ref; | 30 | extern void kmemleak_free(const void *ptr) __ref; |
31 | extern void kmemleak_free_part(const void *ptr, size_t size) __ref; | 31 | extern void kmemleak_free_part(const void *ptr, size_t size) __ref; |
32 | extern void kmemleak_free_percpu(const void __percpu *ptr) __ref; | 32 | extern void kmemleak_free_percpu(const void __percpu *ptr) __ref; |
33 | extern void kmemleak_update_trace(const void *ptr) __ref; | ||
33 | extern void kmemleak_not_leak(const void *ptr) __ref; | 34 | extern void kmemleak_not_leak(const void *ptr) __ref; |
34 | extern void kmemleak_ignore(const void *ptr) __ref; | 35 | extern void kmemleak_ignore(const void *ptr) __ref; |
35 | extern void kmemleak_scan_area(const void *ptr, size_t size, gfp_t gfp) __ref; | 36 | extern void kmemleak_scan_area(const void *ptr, size_t size, gfp_t gfp) __ref; |
@@ -83,6 +84,9 @@ static inline void kmemleak_free_recursive(const void *ptr, unsigned long flags) | |||
83 | static inline void kmemleak_free_percpu(const void __percpu *ptr) | 84 | static inline void kmemleak_free_percpu(const void __percpu *ptr) |
84 | { | 85 | { |
85 | } | 86 | } |
87 | static inline void kmemleak_update_trace(const void *ptr) | ||
88 | { | ||
89 | } | ||
86 | static inline void kmemleak_not_leak(const void *ptr) | 90 | static inline void kmemleak_not_leak(const void *ptr) |
87 | { | 91 | { |
88 | } | 92 | } |
diff --git a/include/linux/mc146818rtc.h b/include/linux/mc146818rtc.h index 2f4e957af656..433e0c74d643 100644 --- a/include/linux/mc146818rtc.h +++ b/include/linux/mc146818rtc.h | |||
@@ -31,6 +31,10 @@ struct cmos_rtc_board_info { | |||
31 | void (*wake_on)(struct device *dev); | 31 | void (*wake_on)(struct device *dev); |
32 | void (*wake_off)(struct device *dev); | 32 | void (*wake_off)(struct device *dev); |
33 | 33 | ||
34 | u32 flags; | ||
35 | #define CMOS_RTC_FLAGS_NOFREQ (1 << 0) | ||
36 | int address_space; | ||
37 | |||
34 | u8 rtc_day_alarm; /* zero, or register index */ | 38 | u8 rtc_day_alarm; /* zero, or register index */ |
35 | u8 rtc_mon_alarm; /* zero, or register index */ | 39 | u8 rtc_mon_alarm; /* zero, or register index */ |
36 | u8 rtc_century; /* zero, or register index */ | 40 | u8 rtc_century; /* zero, or register index */ |
diff --git a/include/linux/ptrace.h b/include/linux/ptrace.h index 07d0df6bf768..077904c8b70d 100644 --- a/include/linux/ptrace.h +++ b/include/linux/ptrace.h | |||
@@ -5,6 +5,7 @@ | |||
5 | #include <linux/sched.h> /* For struct task_struct. */ | 5 | #include <linux/sched.h> /* For struct task_struct. */ |
6 | #include <linux/err.h> /* for IS_ERR_VALUE */ | 6 | #include <linux/err.h> /* for IS_ERR_VALUE */ |
7 | #include <linux/bug.h> /* For BUG_ON. */ | 7 | #include <linux/bug.h> /* For BUG_ON. */ |
8 | #include <linux/pid_namespace.h> /* For task_active_pid_ns. */ | ||
8 | #include <uapi/linux/ptrace.h> | 9 | #include <uapi/linux/ptrace.h> |
9 | 10 | ||
10 | /* | 11 | /* |
@@ -129,6 +130,37 @@ static inline void ptrace_event(int event, unsigned long message) | |||
129 | } | 130 | } |
130 | 131 | ||
131 | /** | 132 | /** |
133 | * ptrace_event_pid - possibly stop for a ptrace event notification | ||
134 | * @event: %PTRACE_EVENT_* value to report | ||
135 | * @pid: process identifier for %PTRACE_GETEVENTMSG to return | ||
136 | * | ||
137 | * Check whether @event is enabled and, if so, report @event and @pid | ||
138 | * to the ptrace parent. @pid is reported as the pid_t seen from the | ||
139 | * the ptrace parent's pid namespace. | ||
140 | * | ||
141 | * Called without locks. | ||
142 | */ | ||
143 | static inline void ptrace_event_pid(int event, struct pid *pid) | ||
144 | { | ||
145 | /* | ||
146 | * FIXME: There's a potential race if a ptracer in a different pid | ||
147 | * namespace than parent attaches between computing message below and | ||
148 | * when we acquire tasklist_lock in ptrace_stop(). If this happens, | ||
149 | * the ptracer will get a bogus pid from PTRACE_GETEVENTMSG. | ||
150 | */ | ||
151 | unsigned long message = 0; | ||
152 | struct pid_namespace *ns; | ||
153 | |||
154 | rcu_read_lock(); | ||
155 | ns = task_active_pid_ns(rcu_dereference(current->parent)); | ||
156 | if (ns) | ||
157 | message = pid_nr_ns(pid, ns); | ||
158 | rcu_read_unlock(); | ||
159 | |||
160 | ptrace_event(event, message); | ||
161 | } | ||
162 | |||
163 | /** | ||
132 | * ptrace_init_task - initialize ptrace state for a new child | 164 | * ptrace_init_task - initialize ptrace state for a new child |
133 | * @child: new child task | 165 | * @child: new child task |
134 | * @ptrace: true if child should be ptrace'd by parent's tracer | 166 | * @ptrace: true if child should be ptrace'd by parent's tracer |
diff --git a/include/linux/sched.h b/include/linux/sched.h index 8fcd0e6098d9..ea74596014a2 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -2414,9 +2414,6 @@ extern void flush_itimer_signals(void); | |||
2414 | 2414 | ||
2415 | extern void do_group_exit(int); | 2415 | extern void do_group_exit(int); |
2416 | 2416 | ||
2417 | extern int allow_signal(int); | ||
2418 | extern int disallow_signal(int); | ||
2419 | |||
2420 | extern int do_execve(struct filename *, | 2417 | extern int do_execve(struct filename *, |
2421 | const char __user * const __user *, | 2418 | const char __user * const __user *, |
2422 | const char __user * const __user *); | 2419 | const char __user * const __user *); |
diff --git a/include/linux/shm.h b/include/linux/shm.h index 1e2cd2e6b540..57d77709fbe2 100644 --- a/include/linux/shm.h +++ b/include/linux/shm.h | |||
@@ -3,9 +3,8 @@ | |||
3 | 3 | ||
4 | #include <asm/page.h> | 4 | #include <asm/page.h> |
5 | #include <uapi/linux/shm.h> | 5 | #include <uapi/linux/shm.h> |
6 | |||
7 | #define SHMALL (SHMMAX/PAGE_SIZE*(SHMMNI/16)) /* max shm system wide (pages) */ | ||
8 | #include <asm/shmparam.h> | 6 | #include <asm/shmparam.h> |
7 | |||
9 | struct shmid_kernel /* private to the kernel */ | 8 | struct shmid_kernel /* private to the kernel */ |
10 | { | 9 | { |
11 | struct kern_ipc_perm shm_perm; | 10 | struct kern_ipc_perm shm_perm; |
diff --git a/include/linux/signal.h b/include/linux/signal.h index 2ac423bdb676..c9e65360c49a 100644 --- a/include/linux/signal.h +++ b/include/linux/signal.h | |||
@@ -63,11 +63,6 @@ static inline int sigismember(sigset_t *set, int _sig) | |||
63 | return 1 & (set->sig[sig / _NSIG_BPW] >> (sig % _NSIG_BPW)); | 63 | return 1 & (set->sig[sig / _NSIG_BPW] >> (sig % _NSIG_BPW)); |
64 | } | 64 | } |
65 | 65 | ||
66 | static inline int sigfindinword(unsigned long word) | ||
67 | { | ||
68 | return ffz(~word); | ||
69 | } | ||
70 | |||
71 | #endif /* __HAVE_ARCH_SIG_BITOPS */ | 66 | #endif /* __HAVE_ARCH_SIG_BITOPS */ |
72 | 67 | ||
73 | static inline int sigisemptyset(sigset_t *set) | 68 | static inline int sigisemptyset(sigset_t *set) |
@@ -289,6 +284,22 @@ extern int get_signal_to_deliver(siginfo_t *info, struct k_sigaction *return_ka, | |||
289 | extern void signal_setup_done(int failed, struct ksignal *ksig, int stepping); | 284 | extern void signal_setup_done(int failed, struct ksignal *ksig, int stepping); |
290 | extern void signal_delivered(int sig, siginfo_t *info, struct k_sigaction *ka, struct pt_regs *regs, int stepping); | 285 | extern void signal_delivered(int sig, siginfo_t *info, struct k_sigaction *ka, struct pt_regs *regs, int stepping); |
291 | extern void exit_signals(struct task_struct *tsk); | 286 | extern void exit_signals(struct task_struct *tsk); |
287 | extern void kernel_sigaction(int, __sighandler_t); | ||
288 | |||
289 | static inline void allow_signal(int sig) | ||
290 | { | ||
291 | /* | ||
292 | * Kernel threads handle their own signals. Let the signal code | ||
293 | * know it'll be handled, so that they don't get converted to | ||
294 | * SIGKILL or just silently dropped. | ||
295 | */ | ||
296 | kernel_sigaction(sig, (__force __sighandler_t)2); | ||
297 | } | ||
298 | |||
299 | static inline void disallow_signal(int sig) | ||
300 | { | ||
301 | kernel_sigaction(sig, SIG_IGN); | ||
302 | } | ||
292 | 303 | ||
293 | /* | 304 | /* |
294 | * Eventually that'll replace get_signal_to_deliver(); macro for now, | 305 | * Eventually that'll replace get_signal_to_deliver(); macro for now, |
diff --git a/include/linux/smp.h b/include/linux/smp.h index 633f5edd7470..34347f26be9b 100644 --- a/include/linux/smp.h +++ b/include/linux/smp.h | |||
@@ -13,8 +13,6 @@ | |||
13 | #include <linux/init.h> | 13 | #include <linux/init.h> |
14 | #include <linux/llist.h> | 14 | #include <linux/llist.h> |
15 | 15 | ||
16 | extern void cpu_idle(void); | ||
17 | |||
18 | typedef void (*smp_call_func_t)(void *info); | 16 | typedef void (*smp_call_func_t)(void *info); |
19 | struct call_single_data { | 17 | struct call_single_data { |
20 | struct llist_node llist; | 18 | struct llist_node llist; |