diff options
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/exit.c | 2 | ||||
-rw-r--r-- | kernel/fork.c | 3 | ||||
-rw-r--r-- | kernel/hrtimer.c | 4 | ||||
-rw-r--r-- | kernel/kprobes.c | 3 | ||||
-rw-r--r-- | kernel/power/snapshot.c | 9 | ||||
-rw-r--r-- | kernel/profile.c | 2 | ||||
-rw-r--r-- | kernel/rcupdate.c | 4 | ||||
-rw-r--r-- | kernel/sched.c | 2 | ||||
-rw-r--r-- | kernel/softirq.c | 4 | ||||
-rw-r--r-- | kernel/softlockup.c | 4 | ||||
-rw-r--r-- | kernel/timer.c | 4 | ||||
-rw-r--r-- | kernel/uid16.c | 59 | ||||
-rw-r--r-- | kernel/workqueue.c | 2 |
13 files changed, 70 insertions, 32 deletions
diff --git a/kernel/exit.c b/kernel/exit.c index 1a9787ac61..f86434d7b3 100644 --- a/kernel/exit.c +++ b/kernel/exit.c | |||
@@ -56,7 +56,7 @@ static void __unhash_process(struct task_struct *p) | |||
56 | detach_pid(p, PIDTYPE_PGID); | 56 | detach_pid(p, PIDTYPE_PGID); |
57 | detach_pid(p, PIDTYPE_SID); | 57 | detach_pid(p, PIDTYPE_SID); |
58 | 58 | ||
59 | list_del_init(&p->tasks); | 59 | list_del_rcu(&p->tasks); |
60 | __get_cpu_var(process_counts)--; | 60 | __get_cpu_var(process_counts)--; |
61 | } | 61 | } |
62 | list_del_rcu(&p->thread_group); | 62 | list_del_rcu(&p->thread_group); |
diff --git a/kernel/fork.c b/kernel/fork.c index 54b15f8cda..d2fa57d480 100644 --- a/kernel/fork.c +++ b/kernel/fork.c | |||
@@ -180,6 +180,7 @@ static struct task_struct *dup_task_struct(struct task_struct *orig) | |||
180 | atomic_set(&tsk->usage,2); | 180 | atomic_set(&tsk->usage,2); |
181 | atomic_set(&tsk->fs_excl, 0); | 181 | atomic_set(&tsk->fs_excl, 0); |
182 | tsk->btrace_seq = 0; | 182 | tsk->btrace_seq = 0; |
183 | tsk->splice_pipe = NULL; | ||
183 | return tsk; | 184 | return tsk; |
184 | } | 185 | } |
185 | 186 | ||
@@ -1204,7 +1205,7 @@ static task_t *copy_process(unsigned long clone_flags, | |||
1204 | attach_pid(p, PIDTYPE_PGID, process_group(p)); | 1205 | attach_pid(p, PIDTYPE_PGID, process_group(p)); |
1205 | attach_pid(p, PIDTYPE_SID, p->signal->session); | 1206 | attach_pid(p, PIDTYPE_SID, p->signal->session); |
1206 | 1207 | ||
1207 | list_add_tail(&p->tasks, &init_task.tasks); | 1208 | list_add_tail_rcu(&p->tasks, &init_task.tasks); |
1208 | __get_cpu_var(process_counts)++; | 1209 | __get_cpu_var(process_counts)++; |
1209 | } | 1210 | } |
1210 | attach_pid(p, PIDTYPE_PID, p->pid); | 1211 | attach_pid(p, PIDTYPE_PID, p->pid); |
diff --git a/kernel/hrtimer.c b/kernel/hrtimer.c index d2a7296c82..b7f0388bd7 100644 --- a/kernel/hrtimer.c +++ b/kernel/hrtimer.c | |||
@@ -836,7 +836,7 @@ static void migrate_hrtimers(int cpu) | |||
836 | } | 836 | } |
837 | #endif /* CONFIG_HOTPLUG_CPU */ | 837 | #endif /* CONFIG_HOTPLUG_CPU */ |
838 | 838 | ||
839 | static int __devinit hrtimer_cpu_notify(struct notifier_block *self, | 839 | static int hrtimer_cpu_notify(struct notifier_block *self, |
840 | unsigned long action, void *hcpu) | 840 | unsigned long action, void *hcpu) |
841 | { | 841 | { |
842 | long cpu = (long)hcpu; | 842 | long cpu = (long)hcpu; |
@@ -860,7 +860,7 @@ static int __devinit hrtimer_cpu_notify(struct notifier_block *self, | |||
860 | return NOTIFY_OK; | 860 | return NOTIFY_OK; |
861 | } | 861 | } |
862 | 862 | ||
863 | static struct notifier_block __devinitdata hrtimers_nb = { | 863 | static struct notifier_block hrtimers_nb = { |
864 | .notifier_call = hrtimer_cpu_notify, | 864 | .notifier_call = hrtimer_cpu_notify, |
865 | }; | 865 | }; |
866 | 866 | ||
diff --git a/kernel/kprobes.c b/kernel/kprobes.c index 1156eb0977..1fbf466a29 100644 --- a/kernel/kprobes.c +++ b/kernel/kprobes.c | |||
@@ -585,6 +585,9 @@ int __kprobes register_kretprobe(struct kretprobe *rp) | |||
585 | int i; | 585 | int i; |
586 | 586 | ||
587 | rp->kp.pre_handler = pre_handler_kretprobe; | 587 | rp->kp.pre_handler = pre_handler_kretprobe; |
588 | rp->kp.post_handler = NULL; | ||
589 | rp->kp.fault_handler = NULL; | ||
590 | rp->kp.break_handler = NULL; | ||
588 | 591 | ||
589 | /* Pre-allocate memory for max kretprobe instances */ | 592 | /* Pre-allocate memory for max kretprobe instances */ |
590 | if (rp->maxactive <= 0) { | 593 | if (rp->maxactive <= 0) { |
diff --git a/kernel/power/snapshot.c b/kernel/power/snapshot.c index c5863d02c8..3eeedbb13b 100644 --- a/kernel/power/snapshot.c +++ b/kernel/power/snapshot.c | |||
@@ -240,14 +240,15 @@ static void copy_data_pages(struct pbe *pblist) | |||
240 | * free_pagedir - free pages allocated with alloc_pagedir() | 240 | * free_pagedir - free pages allocated with alloc_pagedir() |
241 | */ | 241 | */ |
242 | 242 | ||
243 | static void free_pagedir(struct pbe *pblist) | 243 | static void free_pagedir(struct pbe *pblist, int clear_nosave_free) |
244 | { | 244 | { |
245 | struct pbe *pbe; | 245 | struct pbe *pbe; |
246 | 246 | ||
247 | while (pblist) { | 247 | while (pblist) { |
248 | pbe = (pblist + PB_PAGE_SKIP)->next; | 248 | pbe = (pblist + PB_PAGE_SKIP)->next; |
249 | ClearPageNosave(virt_to_page(pblist)); | 249 | ClearPageNosave(virt_to_page(pblist)); |
250 | ClearPageNosaveFree(virt_to_page(pblist)); | 250 | if (clear_nosave_free) |
251 | ClearPageNosaveFree(virt_to_page(pblist)); | ||
251 | free_page((unsigned long)pblist); | 252 | free_page((unsigned long)pblist); |
252 | pblist = pbe; | 253 | pblist = pbe; |
253 | } | 254 | } |
@@ -389,7 +390,7 @@ struct pbe *alloc_pagedir(unsigned int nr_pages, gfp_t gfp_mask, int safe_needed | |||
389 | pbe->next = alloc_image_page(gfp_mask, safe_needed); | 390 | pbe->next = alloc_image_page(gfp_mask, safe_needed); |
390 | } | 391 | } |
391 | if (!pbe) { /* get_zeroed_page() failed */ | 392 | if (!pbe) { /* get_zeroed_page() failed */ |
392 | free_pagedir(pblist); | 393 | free_pagedir(pblist, 1); |
393 | pblist = NULL; | 394 | pblist = NULL; |
394 | } else | 395 | } else |
395 | create_pbe_list(pblist, nr_pages); | 396 | create_pbe_list(pblist, nr_pages); |
@@ -736,7 +737,7 @@ static int create_image(struct snapshot_handle *handle) | |||
736 | pblist = alloc_pagedir(nr_copy_pages, GFP_ATOMIC, 1); | 737 | pblist = alloc_pagedir(nr_copy_pages, GFP_ATOMIC, 1); |
737 | if (pblist) | 738 | if (pblist) |
738 | copy_page_backup_list(pblist, p); | 739 | copy_page_backup_list(pblist, p); |
739 | free_pagedir(p); | 740 | free_pagedir(p, 0); |
740 | if (!pblist) | 741 | if (!pblist) |
741 | error = -ENOMEM; | 742 | error = -ENOMEM; |
742 | } | 743 | } |
diff --git a/kernel/profile.c b/kernel/profile.c index 5a730fdb1a..68afe121e5 100644 --- a/kernel/profile.c +++ b/kernel/profile.c | |||
@@ -299,7 +299,7 @@ out: | |||
299 | } | 299 | } |
300 | 300 | ||
301 | #ifdef CONFIG_HOTPLUG_CPU | 301 | #ifdef CONFIG_HOTPLUG_CPU |
302 | static int __devinit profile_cpu_callback(struct notifier_block *info, | 302 | static int profile_cpu_callback(struct notifier_block *info, |
303 | unsigned long action, void *__cpu) | 303 | unsigned long action, void *__cpu) |
304 | { | 304 | { |
305 | int node, cpu = (unsigned long)__cpu; | 305 | int node, cpu = (unsigned long)__cpu; |
diff --git a/kernel/rcupdate.c b/kernel/rcupdate.c index 13458bbaa1..6d32ff26f9 100644 --- a/kernel/rcupdate.c +++ b/kernel/rcupdate.c | |||
@@ -520,7 +520,7 @@ static void __devinit rcu_online_cpu(int cpu) | |||
520 | tasklet_init(&per_cpu(rcu_tasklet, cpu), rcu_process_callbacks, 0UL); | 520 | tasklet_init(&per_cpu(rcu_tasklet, cpu), rcu_process_callbacks, 0UL); |
521 | } | 521 | } |
522 | 522 | ||
523 | static int __devinit rcu_cpu_notify(struct notifier_block *self, | 523 | static int rcu_cpu_notify(struct notifier_block *self, |
524 | unsigned long action, void *hcpu) | 524 | unsigned long action, void *hcpu) |
525 | { | 525 | { |
526 | long cpu = (long)hcpu; | 526 | long cpu = (long)hcpu; |
@@ -537,7 +537,7 @@ static int __devinit rcu_cpu_notify(struct notifier_block *self, | |||
537 | return NOTIFY_OK; | 537 | return NOTIFY_OK; |
538 | } | 538 | } |
539 | 539 | ||
540 | static struct notifier_block __devinitdata rcu_nb = { | 540 | static struct notifier_block rcu_nb = { |
541 | .notifier_call = rcu_cpu_notify, | 541 | .notifier_call = rcu_cpu_notify, |
542 | }; | 542 | }; |
543 | 543 | ||
diff --git a/kernel/sched.c b/kernel/sched.c index 365f0b90b4..4c64f85698 100644 --- a/kernel/sched.c +++ b/kernel/sched.c | |||
@@ -4814,7 +4814,7 @@ static int migration_call(struct notifier_block *nfb, unsigned long action, | |||
4814 | /* Register at highest priority so that task migration (migrate_all_tasks) | 4814 | /* Register at highest priority so that task migration (migrate_all_tasks) |
4815 | * happens before everything else. | 4815 | * happens before everything else. |
4816 | */ | 4816 | */ |
4817 | static struct notifier_block __devinitdata migration_notifier = { | 4817 | static struct notifier_block migration_notifier = { |
4818 | .notifier_call = migration_call, | 4818 | .notifier_call = migration_call, |
4819 | .priority = 10 | 4819 | .priority = 10 |
4820 | }; | 4820 | }; |
diff --git a/kernel/softirq.c b/kernel/softirq.c index ec8fed42a8..336f92d64e 100644 --- a/kernel/softirq.c +++ b/kernel/softirq.c | |||
@@ -446,7 +446,7 @@ static void takeover_tasklets(unsigned int cpu) | |||
446 | } | 446 | } |
447 | #endif /* CONFIG_HOTPLUG_CPU */ | 447 | #endif /* CONFIG_HOTPLUG_CPU */ |
448 | 448 | ||
449 | static int __devinit cpu_callback(struct notifier_block *nfb, | 449 | static int cpu_callback(struct notifier_block *nfb, |
450 | unsigned long action, | 450 | unsigned long action, |
451 | void *hcpu) | 451 | void *hcpu) |
452 | { | 452 | { |
@@ -484,7 +484,7 @@ static int __devinit cpu_callback(struct notifier_block *nfb, | |||
484 | return NOTIFY_OK; | 484 | return NOTIFY_OK; |
485 | } | 485 | } |
486 | 486 | ||
487 | static struct notifier_block __devinitdata cpu_nfb = { | 487 | static struct notifier_block cpu_nfb = { |
488 | .notifier_call = cpu_callback | 488 | .notifier_call = cpu_callback |
489 | }; | 489 | }; |
490 | 490 | ||
diff --git a/kernel/softlockup.c b/kernel/softlockup.c index ced91e1ff5..14c7faf029 100644 --- a/kernel/softlockup.c +++ b/kernel/softlockup.c | |||
@@ -104,7 +104,7 @@ static int watchdog(void * __bind_cpu) | |||
104 | /* | 104 | /* |
105 | * Create/destroy watchdog threads as CPUs come and go: | 105 | * Create/destroy watchdog threads as CPUs come and go: |
106 | */ | 106 | */ |
107 | static int __devinit | 107 | static int |
108 | cpu_callback(struct notifier_block *nfb, unsigned long action, void *hcpu) | 108 | cpu_callback(struct notifier_block *nfb, unsigned long action, void *hcpu) |
109 | { | 109 | { |
110 | int hotcpu = (unsigned long)hcpu; | 110 | int hotcpu = (unsigned long)hcpu; |
@@ -140,7 +140,7 @@ cpu_callback(struct notifier_block *nfb, unsigned long action, void *hcpu) | |||
140 | return NOTIFY_OK; | 140 | return NOTIFY_OK; |
141 | } | 141 | } |
142 | 142 | ||
143 | static struct notifier_block __devinitdata cpu_nfb = { | 143 | static struct notifier_block cpu_nfb = { |
144 | .notifier_call = cpu_callback | 144 | .notifier_call = cpu_callback |
145 | }; | 145 | }; |
146 | 146 | ||
diff --git a/kernel/timer.c b/kernel/timer.c index 8837737888..67eaf0f540 100644 --- a/kernel/timer.c +++ b/kernel/timer.c | |||
@@ -1314,7 +1314,7 @@ static void __devinit migrate_timers(int cpu) | |||
1314 | } | 1314 | } |
1315 | #endif /* CONFIG_HOTPLUG_CPU */ | 1315 | #endif /* CONFIG_HOTPLUG_CPU */ |
1316 | 1316 | ||
1317 | static int __devinit timer_cpu_notify(struct notifier_block *self, | 1317 | static int timer_cpu_notify(struct notifier_block *self, |
1318 | unsigned long action, void *hcpu) | 1318 | unsigned long action, void *hcpu) |
1319 | { | 1319 | { |
1320 | long cpu = (long)hcpu; | 1320 | long cpu = (long)hcpu; |
@@ -1334,7 +1334,7 @@ static int __devinit timer_cpu_notify(struct notifier_block *self, | |||
1334 | return NOTIFY_OK; | 1334 | return NOTIFY_OK; |
1335 | } | 1335 | } |
1336 | 1336 | ||
1337 | static struct notifier_block __devinitdata timers_nb = { | 1337 | static struct notifier_block timers_nb = { |
1338 | .notifier_call = timer_cpu_notify, | 1338 | .notifier_call = timer_cpu_notify, |
1339 | }; | 1339 | }; |
1340 | 1340 | ||
diff --git a/kernel/uid16.c b/kernel/uid16.c index aa25605027..187e2a4238 100644 --- a/kernel/uid16.c +++ b/kernel/uid16.c | |||
@@ -20,43 +20,67 @@ | |||
20 | 20 | ||
21 | asmlinkage long sys_chown16(const char __user * filename, old_uid_t user, old_gid_t group) | 21 | asmlinkage long sys_chown16(const char __user * filename, old_uid_t user, old_gid_t group) |
22 | { | 22 | { |
23 | return sys_chown(filename, low2highuid(user), low2highgid(group)); | 23 | long ret = sys_chown(filename, low2highuid(user), low2highgid(group)); |
24 | /* avoid REGPARM breakage on x86: */ | ||
25 | prevent_tail_call(ret); | ||
26 | return ret; | ||
24 | } | 27 | } |
25 | 28 | ||
26 | asmlinkage long sys_lchown16(const char __user * filename, old_uid_t user, old_gid_t group) | 29 | asmlinkage long sys_lchown16(const char __user * filename, old_uid_t user, old_gid_t group) |
27 | { | 30 | { |
28 | return sys_lchown(filename, low2highuid(user), low2highgid(group)); | 31 | long ret = sys_lchown(filename, low2highuid(user), low2highgid(group)); |
32 | /* avoid REGPARM breakage on x86: */ | ||
33 | prevent_tail_call(ret); | ||
34 | return ret; | ||
29 | } | 35 | } |
30 | 36 | ||
31 | asmlinkage long sys_fchown16(unsigned int fd, old_uid_t user, old_gid_t group) | 37 | asmlinkage long sys_fchown16(unsigned int fd, old_uid_t user, old_gid_t group) |
32 | { | 38 | { |
33 | return sys_fchown(fd, low2highuid(user), low2highgid(group)); | 39 | long ret = sys_fchown(fd, low2highuid(user), low2highgid(group)); |
40 | /* avoid REGPARM breakage on x86: */ | ||
41 | prevent_tail_call(ret); | ||
42 | return ret; | ||
34 | } | 43 | } |
35 | 44 | ||
36 | asmlinkage long sys_setregid16(old_gid_t rgid, old_gid_t egid) | 45 | asmlinkage long sys_setregid16(old_gid_t rgid, old_gid_t egid) |
37 | { | 46 | { |
38 | return sys_setregid(low2highgid(rgid), low2highgid(egid)); | 47 | long ret = sys_setregid(low2highgid(rgid), low2highgid(egid)); |
48 | /* avoid REGPARM breakage on x86: */ | ||
49 | prevent_tail_call(ret); | ||
50 | return ret; | ||
39 | } | 51 | } |
40 | 52 | ||
41 | asmlinkage long sys_setgid16(old_gid_t gid) | 53 | asmlinkage long sys_setgid16(old_gid_t gid) |
42 | { | 54 | { |
43 | return sys_setgid(low2highgid(gid)); | 55 | long ret = sys_setgid(low2highgid(gid)); |
56 | /* avoid REGPARM breakage on x86: */ | ||
57 | prevent_tail_call(ret); | ||
58 | return ret; | ||
44 | } | 59 | } |
45 | 60 | ||
46 | asmlinkage long sys_setreuid16(old_uid_t ruid, old_uid_t euid) | 61 | asmlinkage long sys_setreuid16(old_uid_t ruid, old_uid_t euid) |
47 | { | 62 | { |
48 | return sys_setreuid(low2highuid(ruid), low2highuid(euid)); | 63 | long ret = sys_setreuid(low2highuid(ruid), low2highuid(euid)); |
64 | /* avoid REGPARM breakage on x86: */ | ||
65 | prevent_tail_call(ret); | ||
66 | return ret; | ||
49 | } | 67 | } |
50 | 68 | ||
51 | asmlinkage long sys_setuid16(old_uid_t uid) | 69 | asmlinkage long sys_setuid16(old_uid_t uid) |
52 | { | 70 | { |
53 | return sys_setuid(low2highuid(uid)); | 71 | long ret = sys_setuid(low2highuid(uid)); |
72 | /* avoid REGPARM breakage on x86: */ | ||
73 | prevent_tail_call(ret); | ||
74 | return ret; | ||
54 | } | 75 | } |
55 | 76 | ||
56 | asmlinkage long sys_setresuid16(old_uid_t ruid, old_uid_t euid, old_uid_t suid) | 77 | asmlinkage long sys_setresuid16(old_uid_t ruid, old_uid_t euid, old_uid_t suid) |
57 | { | 78 | { |
58 | return sys_setresuid(low2highuid(ruid), low2highuid(euid), | 79 | long ret = sys_setresuid(low2highuid(ruid), low2highuid(euid), |
59 | low2highuid(suid)); | 80 | low2highuid(suid)); |
81 | /* avoid REGPARM breakage on x86: */ | ||
82 | prevent_tail_call(ret); | ||
83 | return ret; | ||
60 | } | 84 | } |
61 | 85 | ||
62 | asmlinkage long sys_getresuid16(old_uid_t __user *ruid, old_uid_t __user *euid, old_uid_t __user *suid) | 86 | asmlinkage long sys_getresuid16(old_uid_t __user *ruid, old_uid_t __user *euid, old_uid_t __user *suid) |
@@ -72,8 +96,11 @@ asmlinkage long sys_getresuid16(old_uid_t __user *ruid, old_uid_t __user *euid, | |||
72 | 96 | ||
73 | asmlinkage long sys_setresgid16(old_gid_t rgid, old_gid_t egid, old_gid_t sgid) | 97 | asmlinkage long sys_setresgid16(old_gid_t rgid, old_gid_t egid, old_gid_t sgid) |
74 | { | 98 | { |
75 | return sys_setresgid(low2highgid(rgid), low2highgid(egid), | 99 | long ret = sys_setresgid(low2highgid(rgid), low2highgid(egid), |
76 | low2highgid(sgid)); | 100 | low2highgid(sgid)); |
101 | /* avoid REGPARM breakage on x86: */ | ||
102 | prevent_tail_call(ret); | ||
103 | return ret; | ||
77 | } | 104 | } |
78 | 105 | ||
79 | asmlinkage long sys_getresgid16(old_gid_t __user *rgid, old_gid_t __user *egid, old_gid_t __user *sgid) | 106 | asmlinkage long sys_getresgid16(old_gid_t __user *rgid, old_gid_t __user *egid, old_gid_t __user *sgid) |
@@ -89,12 +116,18 @@ asmlinkage long sys_getresgid16(old_gid_t __user *rgid, old_gid_t __user *egid, | |||
89 | 116 | ||
90 | asmlinkage long sys_setfsuid16(old_uid_t uid) | 117 | asmlinkage long sys_setfsuid16(old_uid_t uid) |
91 | { | 118 | { |
92 | return sys_setfsuid(low2highuid(uid)); | 119 | long ret = sys_setfsuid(low2highuid(uid)); |
120 | /* avoid REGPARM breakage on x86: */ | ||
121 | prevent_tail_call(ret); | ||
122 | return ret; | ||
93 | } | 123 | } |
94 | 124 | ||
95 | asmlinkage long sys_setfsgid16(old_gid_t gid) | 125 | asmlinkage long sys_setfsgid16(old_gid_t gid) |
96 | { | 126 | { |
97 | return sys_setfsgid(low2highgid(gid)); | 127 | long ret = sys_setfsgid(low2highgid(gid)); |
128 | /* avoid REGPARM breakage on x86: */ | ||
129 | prevent_tail_call(ret); | ||
130 | return ret; | ||
98 | } | 131 | } |
99 | 132 | ||
100 | static int groups16_to_user(old_gid_t __user *grouplist, | 133 | static int groups16_to_user(old_gid_t __user *grouplist, |
diff --git a/kernel/workqueue.c b/kernel/workqueue.c index e9e464a903..880fb415a8 100644 --- a/kernel/workqueue.c +++ b/kernel/workqueue.c | |||
@@ -547,7 +547,7 @@ static void take_over_work(struct workqueue_struct *wq, unsigned int cpu) | |||
547 | } | 547 | } |
548 | 548 | ||
549 | /* We're holding the cpucontrol mutex here */ | 549 | /* We're holding the cpucontrol mutex here */ |
550 | static int __devinit workqueue_cpu_callback(struct notifier_block *nfb, | 550 | static int workqueue_cpu_callback(struct notifier_block *nfb, |
551 | unsigned long action, | 551 | unsigned long action, |
552 | void *hcpu) | 552 | void *hcpu) |
553 | { | 553 | { |