aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'kernel')
-rw-r--r--kernel/audit.c6
-rw-r--r--kernel/cgroup.c47
-rw-r--r--kernel/exit.c4
-rw-r--r--kernel/fork.c2
-rw-r--r--kernel/futex.c6
-rw-r--r--kernel/futex_compat.c2
-rw-r--r--kernel/marker.c9
-rw-r--r--kernel/relay.c7
-rw-r--r--kernel/sched.c43
-rw-r--r--kernel/time/clocksource.c2
-rw-r--r--kernel/timer.c10
-rw-r--r--kernel/uid16.c22
12 files changed, 129 insertions, 31 deletions
diff --git a/kernel/audit.c b/kernel/audit.c
index be55cb503633..b782b046543d 100644
--- a/kernel/audit.c
+++ b/kernel/audit.c
@@ -1269,8 +1269,8 @@ static void audit_log_n_string(struct audit_buffer *ab, size_t slen,
1269 1269
1270/** 1270/**
1271 * audit_string_contains_control - does a string need to be logged in hex 1271 * audit_string_contains_control - does a string need to be logged in hex
1272 * @string - string to be checked 1272 * @string: string to be checked
1273 * @len - max length of the string to check 1273 * @len: max length of the string to check
1274 */ 1274 */
1275int audit_string_contains_control(const char *string, size_t len) 1275int audit_string_contains_control(const char *string, size_t len)
1276{ 1276{
@@ -1285,7 +1285,7 @@ int audit_string_contains_control(const char *string, size_t len)
1285/** 1285/**
1286 * audit_log_n_untrustedstring - log a string that may contain random characters 1286 * audit_log_n_untrustedstring - log a string that may contain random characters
1287 * @ab: audit_buffer 1287 * @ab: audit_buffer
1288 * @len: lenth of string (not including trailing null) 1288 * @len: length of string (not including trailing null)
1289 * @string: string to be logged 1289 * @string: string to be logged
1290 * 1290 *
1291 * This code will escape a string that is passed to it if the string 1291 * This code will escape a string that is passed to it if the string
diff --git a/kernel/cgroup.c b/kernel/cgroup.c
index e9c2fb01e89b..2727f9238359 100644
--- a/kernel/cgroup.c
+++ b/kernel/cgroup.c
@@ -782,7 +782,14 @@ static int parse_cgroupfs_options(char *data,
782 if (!*token) 782 if (!*token)
783 return -EINVAL; 783 return -EINVAL;
784 if (!strcmp(token, "all")) { 784 if (!strcmp(token, "all")) {
785 opts->subsys_bits = (1 << CGROUP_SUBSYS_COUNT) - 1; 785 /* Add all non-disabled subsystems */
786 int i;
787 opts->subsys_bits = 0;
788 for (i = 0; i < CGROUP_SUBSYS_COUNT; i++) {
789 struct cgroup_subsys *ss = subsys[i];
790 if (!ss->disabled)
791 opts->subsys_bits |= 1ul << i;
792 }
786 } else if (!strcmp(token, "noprefix")) { 793 } else if (!strcmp(token, "noprefix")) {
787 set_bit(ROOT_NOPREFIX, &opts->flags); 794 set_bit(ROOT_NOPREFIX, &opts->flags);
788 } else if (!strncmp(token, "release_agent=", 14)) { 795 } else if (!strncmp(token, "release_agent=", 14)) {
@@ -800,7 +807,8 @@ static int parse_cgroupfs_options(char *data,
800 for (i = 0; i < CGROUP_SUBSYS_COUNT; i++) { 807 for (i = 0; i < CGROUP_SUBSYS_COUNT; i++) {
801 ss = subsys[i]; 808 ss = subsys[i];
802 if (!strcmp(token, ss->name)) { 809 if (!strcmp(token, ss->name)) {
803 set_bit(i, &opts->subsys_bits); 810 if (!ss->disabled)
811 set_bit(i, &opts->subsys_bits);
804 break; 812 break;
805 } 813 }
806 } 814 }
@@ -2082,7 +2090,7 @@ static int cgroup_tasks_open(struct inode *unused, struct file *file)
2082 2090
2083 kfree(pidarray); 2091 kfree(pidarray);
2084 } else { 2092 } else {
2085 ctr->buf = 0; 2093 ctr->buf = NULL;
2086 ctr->bufsz = 0; 2094 ctr->bufsz = 0;
2087 } 2095 }
2088 file->private_data = ctr; 2096 file->private_data = ctr;
@@ -2561,6 +2569,7 @@ static int proc_cgroup_show(struct seq_file *m, void *v)
2561 /* Skip this hierarchy if it has no active subsystems */ 2569 /* Skip this hierarchy if it has no active subsystems */
2562 if (!root->actual_subsys_bits) 2570 if (!root->actual_subsys_bits)
2563 continue; 2571 continue;
2572 seq_printf(m, "%lu:", root->subsys_bits);
2564 for_each_subsys(root, ss) 2573 for_each_subsys(root, ss)
2565 seq_printf(m, "%s%s", count++ ? "," : "", ss->name); 2574 seq_printf(m, "%s%s", count++ ? "," : "", ss->name);
2566 seq_putc(m, ':'); 2575 seq_putc(m, ':');
@@ -2600,13 +2609,13 @@ static int proc_cgroupstats_show(struct seq_file *m, void *v)
2600{ 2609{
2601 int i; 2610 int i;
2602 2611
2603 seq_puts(m, "#subsys_name\thierarchy\tnum_cgroups\n"); 2612 seq_puts(m, "#subsys_name\thierarchy\tnum_cgroups\tenabled\n");
2604 mutex_lock(&cgroup_mutex); 2613 mutex_lock(&cgroup_mutex);
2605 for (i = 0; i < CGROUP_SUBSYS_COUNT; i++) { 2614 for (i = 0; i < CGROUP_SUBSYS_COUNT; i++) {
2606 struct cgroup_subsys *ss = subsys[i]; 2615 struct cgroup_subsys *ss = subsys[i];
2607 seq_printf(m, "%s\t%lu\t%d\n", 2616 seq_printf(m, "%s\t%lu\t%d\t%d\n",
2608 ss->name, ss->root->subsys_bits, 2617 ss->name, ss->root->subsys_bits,
2609 ss->root->number_of_cgroups); 2618 ss->root->number_of_cgroups, !ss->disabled);
2610 } 2619 }
2611 mutex_unlock(&cgroup_mutex); 2620 mutex_unlock(&cgroup_mutex);
2612 return 0; 2621 return 0;
@@ -2614,7 +2623,7 @@ static int proc_cgroupstats_show(struct seq_file *m, void *v)
2614 2623
2615static int cgroupstats_open(struct inode *inode, struct file *file) 2624static int cgroupstats_open(struct inode *inode, struct file *file)
2616{ 2625{
2617 return single_open(file, proc_cgroupstats_show, 0); 2626 return single_open(file, proc_cgroupstats_show, NULL);
2618} 2627}
2619 2628
2620static struct file_operations proc_cgroupstats_operations = { 2629static struct file_operations proc_cgroupstats_operations = {
@@ -3010,3 +3019,27 @@ static void cgroup_release_agent(struct work_struct *work)
3010 spin_unlock(&release_list_lock); 3019 spin_unlock(&release_list_lock);
3011 mutex_unlock(&cgroup_mutex); 3020 mutex_unlock(&cgroup_mutex);
3012} 3021}
3022
3023static int __init cgroup_disable(char *str)
3024{
3025 int i;
3026 char *token;
3027
3028 while ((token = strsep(&str, ",")) != NULL) {
3029 if (!*token)
3030 continue;
3031
3032 for (i = 0; i < CGROUP_SUBSYS_COUNT; i++) {
3033 struct cgroup_subsys *ss = subsys[i];
3034
3035 if (!strcmp(token, ss->name)) {
3036 ss->disabled = 1;
3037 printk(KERN_INFO "Disabling %s control group"
3038 " subsystem\n", ss->name);
3039 break;
3040 }
3041 }
3042 }
3043 return 1;
3044}
3045__setup("cgroup_disable=", cgroup_disable);
diff --git a/kernel/exit.c b/kernel/exit.c
index 53872bf993fa..073005b1cfb2 100644
--- a/kernel/exit.c
+++ b/kernel/exit.c
@@ -1608,7 +1608,7 @@ asmlinkage long sys_waitid(int which, pid_t upid,
1608 put_pid(pid); 1608 put_pid(pid);
1609 1609
1610 /* avoid REGPARM breakage on x86: */ 1610 /* avoid REGPARM breakage on x86: */
1611 prevent_tail_call(ret); 1611 asmlinkage_protect(5, ret, which, upid, infop, options, ru);
1612 return ret; 1612 return ret;
1613} 1613}
1614 1614
@@ -1640,7 +1640,7 @@ asmlinkage long sys_wait4(pid_t upid, int __user *stat_addr,
1640 put_pid(pid); 1640 put_pid(pid);
1641 1641
1642 /* avoid REGPARM breakage on x86: */ 1642 /* avoid REGPARM breakage on x86: */
1643 prevent_tail_call(ret); 1643 asmlinkage_protect(4, ret, upid, stat_addr, options, ru);
1644 return ret; 1644 return ret;
1645} 1645}
1646 1646
diff --git a/kernel/fork.c b/kernel/fork.c
index dd249c37b3a3..9c042f901570 100644
--- a/kernel/fork.c
+++ b/kernel/fork.c
@@ -394,7 +394,6 @@ void __mmdrop(struct mm_struct *mm)
394{ 394{
395 BUG_ON(mm == &init_mm); 395 BUG_ON(mm == &init_mm);
396 mm_free_pgd(mm); 396 mm_free_pgd(mm);
397 mm_free_cgroup(mm);
398 destroy_context(mm); 397 destroy_context(mm);
399 free_mm(mm); 398 free_mm(mm);
400} 399}
@@ -416,6 +415,7 @@ void mmput(struct mm_struct *mm)
416 spin_unlock(&mmlist_lock); 415 spin_unlock(&mmlist_lock);
417 } 416 }
418 put_swap_token(mm); 417 put_swap_token(mm);
418 mm_free_cgroup(mm);
419 mmdrop(mm); 419 mmdrop(mm);
420 } 420 }
421} 421}
diff --git a/kernel/futex.c b/kernel/futex.c
index 06968cd79200..e43945e995f5 100644
--- a/kernel/futex.c
+++ b/kernel/futex.c
@@ -281,7 +281,7 @@ static int get_futex_key(u32 __user *uaddr, struct rw_semaphore *fshared,
281 */ 281 */
282static void get_futex_key_refs(union futex_key *key) 282static void get_futex_key_refs(union futex_key *key)
283{ 283{
284 if (key->both.ptr == 0) 284 if (key->both.ptr == NULL)
285 return; 285 return;
286 switch (key->both.offset & (FUT_OFF_INODE|FUT_OFF_MMSHARED)) { 286 switch (key->both.offset & (FUT_OFF_INODE|FUT_OFF_MMSHARED)) {
287 case FUT_OFF_INODE: 287 case FUT_OFF_INODE:
@@ -2158,7 +2158,7 @@ static struct file_system_type futex_fs_type = {
2158 .kill_sb = kill_anon_super, 2158 .kill_sb = kill_anon_super,
2159}; 2159};
2160 2160
2161static int __init init(void) 2161static int __init futex_init(void)
2162{ 2162{
2163 u32 curval; 2163 u32 curval;
2164 int i; 2164 int i;
@@ -2194,4 +2194,4 @@ static int __init init(void)
2194 2194
2195 return 0; 2195 return 0;
2196} 2196}
2197__initcall(init); 2197__initcall(futex_init);
diff --git a/kernel/futex_compat.c b/kernel/futex_compat.c
index ff90f049f8f6..04ac3a9e42cf 100644
--- a/kernel/futex_compat.c
+++ b/kernel/futex_compat.c
@@ -30,7 +30,7 @@ fetch_robust_entry(compat_uptr_t *uentry, struct robust_list __user **entry,
30 return 0; 30 return 0;
31} 31}
32 32
33static void __user *futex_uaddr(struct robust_list *entry, 33static void __user *futex_uaddr(struct robust_list __user *entry,
34 compat_long_t futex_offset) 34 compat_long_t futex_offset)
35{ 35{
36 compat_uptr_t base = ptr_to_compat(entry); 36 compat_uptr_t base = ptr_to_compat(entry);
diff --git a/kernel/marker.c b/kernel/marker.c
index 041c33e3e95c..005b95954593 100644
--- a/kernel/marker.c
+++ b/kernel/marker.c
@@ -671,6 +671,9 @@ int marker_probe_register(const char *name, const char *format,
671 entry->rcu_pending = 1; 671 entry->rcu_pending = 1;
672 /* write rcu_pending before calling the RCU callback */ 672 /* write rcu_pending before calling the RCU callback */
673 smp_wmb(); 673 smp_wmb();
674#ifdef CONFIG_PREEMPT_RCU
675 synchronize_sched(); /* Until we have the call_rcu_sched() */
676#endif
674 call_rcu(&entry->rcu, free_old_closure); 677 call_rcu(&entry->rcu, free_old_closure);
675end: 678end:
676 mutex_unlock(&markers_mutex); 679 mutex_unlock(&markers_mutex);
@@ -714,6 +717,9 @@ int marker_probe_unregister(const char *name,
714 entry->rcu_pending = 1; 717 entry->rcu_pending = 1;
715 /* write rcu_pending before calling the RCU callback */ 718 /* write rcu_pending before calling the RCU callback */
716 smp_wmb(); 719 smp_wmb();
720#ifdef CONFIG_PREEMPT_RCU
721 synchronize_sched(); /* Until we have the call_rcu_sched() */
722#endif
717 call_rcu(&entry->rcu, free_old_closure); 723 call_rcu(&entry->rcu, free_old_closure);
718 remove_marker(name); /* Ignore busy error message */ 724 remove_marker(name); /* Ignore busy error message */
719 ret = 0; 725 ret = 0;
@@ -792,6 +798,9 @@ int marker_probe_unregister_private_data(marker_probe_func *probe,
792 entry->rcu_pending = 1; 798 entry->rcu_pending = 1;
793 /* write rcu_pending before calling the RCU callback */ 799 /* write rcu_pending before calling the RCU callback */
794 smp_wmb(); 800 smp_wmb();
801#ifdef CONFIG_PREEMPT_RCU
802 synchronize_sched(); /* Until we have the call_rcu_sched() */
803#endif
795 call_rcu(&entry->rcu, free_old_closure); 804 call_rcu(&entry->rcu, free_old_closure);
796 remove_marker(entry->name); /* Ignore busy error message */ 805 remove_marker(entry->name); /* Ignore busy error message */
797end: 806end:
diff --git a/kernel/relay.c b/kernel/relay.c
index 4c035a8a248c..d6204a485818 100644
--- a/kernel/relay.c
+++ b/kernel/relay.c
@@ -736,7 +736,7 @@ static int relay_file_open(struct inode *inode, struct file *filp)
736 kref_get(&buf->kref); 736 kref_get(&buf->kref);
737 filp->private_data = buf; 737 filp->private_data = buf;
738 738
739 return 0; 739 return nonseekable_open(inode, filp);
740} 740}
741 741
742/** 742/**
@@ -1056,6 +1056,10 @@ static struct pipe_buf_operations relay_pipe_buf_ops = {
1056 .get = generic_pipe_buf_get, 1056 .get = generic_pipe_buf_get,
1057}; 1057};
1058 1058
1059static void relay_page_release(struct splice_pipe_desc *spd, unsigned int i)
1060{
1061}
1062
1059/* 1063/*
1060 * subbuf_splice_actor - splice up to one subbuf's worth of data 1064 * subbuf_splice_actor - splice up to one subbuf's worth of data
1061 */ 1065 */
@@ -1083,6 +1087,7 @@ static int subbuf_splice_actor(struct file *in,
1083 .partial = partial, 1087 .partial = partial,
1084 .flags = flags, 1088 .flags = flags,
1085 .ops = &relay_pipe_buf_ops, 1089 .ops = &relay_pipe_buf_ops,
1090 .spd_release = relay_page_release,
1086 }; 1091 };
1087 1092
1088 if (rbuf->subbufs_produced == rbuf->subbufs_consumed) 1093 if (rbuf->subbufs_produced == rbuf->subbufs_consumed)
diff --git a/kernel/sched.c b/kernel/sched.c
index 28c73f07efb2..8dcdec6fe0fe 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -1052,6 +1052,49 @@ static void resched_cpu(int cpu)
1052 resched_task(cpu_curr(cpu)); 1052 resched_task(cpu_curr(cpu));
1053 spin_unlock_irqrestore(&rq->lock, flags); 1053 spin_unlock_irqrestore(&rq->lock, flags);
1054} 1054}
1055
1056#ifdef CONFIG_NO_HZ
1057/*
1058 * When add_timer_on() enqueues a timer into the timer wheel of an
1059 * idle CPU then this timer might expire before the next timer event
1060 * which is scheduled to wake up that CPU. In case of a completely
1061 * idle system the next event might even be infinite time into the
1062 * future. wake_up_idle_cpu() ensures that the CPU is woken up and
1063 * leaves the inner idle loop so the newly added timer is taken into
1064 * account when the CPU goes back to idle and evaluates the timer
1065 * wheel for the next timer event.
1066 */
1067void wake_up_idle_cpu(int cpu)
1068{
1069 struct rq *rq = cpu_rq(cpu);
1070
1071 if (cpu == smp_processor_id())
1072 return;
1073
1074 /*
1075 * This is safe, as this function is called with the timer
1076 * wheel base lock of (cpu) held. When the CPU is on the way
1077 * to idle and has not yet set rq->curr to idle then it will
1078 * be serialized on the timer wheel base lock and take the new
1079 * timer into account automatically.
1080 */
1081 if (rq->curr != rq->idle)
1082 return;
1083
1084 /*
1085 * We can set TIF_RESCHED on the idle task of the other CPU
1086 * lockless. The worst case is that the other CPU runs the
1087 * idle task through an additional NOOP schedule()
1088 */
1089 set_tsk_thread_flag(rq->idle, TIF_NEED_RESCHED);
1090
1091 /* NEED_RESCHED must be visible before we test polling */
1092 smp_mb();
1093 if (!tsk_is_polling(rq->idle))
1094 smp_send_reschedule(cpu);
1095}
1096#endif
1097
1055#else 1098#else
1056static void __resched_task(struct task_struct *p, int tif_bit) 1099static void __resched_task(struct task_struct *p, int tif_bit)
1057{ 1100{
diff --git a/kernel/time/clocksource.c b/kernel/time/clocksource.c
index 278534bbca95..7f60097d443a 100644
--- a/kernel/time/clocksource.c
+++ b/kernel/time/clocksource.c
@@ -174,7 +174,7 @@ static void clocksource_check_watchdog(struct clocksource *cs)
174 if (watchdog) 174 if (watchdog)
175 del_timer(&watchdog_timer); 175 del_timer(&watchdog_timer);
176 watchdog = cs; 176 watchdog = cs;
177 init_timer_deferrable(&watchdog_timer); 177 init_timer(&watchdog_timer);
178 watchdog_timer.function = clocksource_watchdog; 178 watchdog_timer.function = clocksource_watchdog;
179 179
180 /* Reset watchdog cycles */ 180 /* Reset watchdog cycles */
diff --git a/kernel/timer.c b/kernel/timer.c
index 99b00a25f88b..b024106daa70 100644
--- a/kernel/timer.c
+++ b/kernel/timer.c
@@ -451,10 +451,18 @@ void add_timer_on(struct timer_list *timer, int cpu)
451 spin_lock_irqsave(&base->lock, flags); 451 spin_lock_irqsave(&base->lock, flags);
452 timer_set_base(timer, base); 452 timer_set_base(timer, base);
453 internal_add_timer(base, timer); 453 internal_add_timer(base, timer);
454 /*
455 * Check whether the other CPU is idle and needs to be
456 * triggered to reevaluate the timer wheel when nohz is
457 * active. We are protected against the other CPU fiddling
458 * with the timer by holding the timer base lock. This also
459 * makes sure that a CPU on the way to idle can not evaluate
460 * the timer wheel.
461 */
462 wake_up_idle_cpu(cpu);
454 spin_unlock_irqrestore(&base->lock, flags); 463 spin_unlock_irqrestore(&base->lock, flags);
455} 464}
456 465
457
458/** 466/**
459 * mod_timer - modify a timer's timeout 467 * mod_timer - modify a timer's timeout
460 * @timer: the timer to be modified 468 * @timer: the timer to be modified
diff --git a/kernel/uid16.c b/kernel/uid16.c
index dd308ba4e03b..3e41c1673e2f 100644
--- a/kernel/uid16.c
+++ b/kernel/uid16.c
@@ -21,7 +21,7 @@ asmlinkage long sys_chown16(const char __user * filename, old_uid_t user, old_gi
21{ 21{
22 long ret = sys_chown(filename, low2highuid(user), low2highgid(group)); 22 long ret = sys_chown(filename, low2highuid(user), low2highgid(group));
23 /* avoid REGPARM breakage on x86: */ 23 /* avoid REGPARM breakage on x86: */
24 prevent_tail_call(ret); 24 asmlinkage_protect(3, ret, filename, user, group);
25 return ret; 25 return ret;
26} 26}
27 27
@@ -29,7 +29,7 @@ asmlinkage long sys_lchown16(const char __user * filename, old_uid_t user, old_g
29{ 29{
30 long ret = sys_lchown(filename, low2highuid(user), low2highgid(group)); 30 long ret = sys_lchown(filename, low2highuid(user), low2highgid(group));
31 /* avoid REGPARM breakage on x86: */ 31 /* avoid REGPARM breakage on x86: */
32 prevent_tail_call(ret); 32 asmlinkage_protect(3, ret, filename, user, group);
33 return ret; 33 return ret;
34} 34}
35 35
@@ -37,7 +37,7 @@ asmlinkage long sys_fchown16(unsigned int fd, old_uid_t user, old_gid_t group)
37{ 37{
38 long ret = sys_fchown(fd, low2highuid(user), low2highgid(group)); 38 long ret = sys_fchown(fd, low2highuid(user), low2highgid(group));
39 /* avoid REGPARM breakage on x86: */ 39 /* avoid REGPARM breakage on x86: */
40 prevent_tail_call(ret); 40 asmlinkage_protect(3, ret, fd, user, group);
41 return ret; 41 return ret;
42} 42}
43 43
@@ -45,7 +45,7 @@ asmlinkage long sys_setregid16(old_gid_t rgid, old_gid_t egid)
45{ 45{
46 long ret = sys_setregid(low2highgid(rgid), low2highgid(egid)); 46 long ret = sys_setregid(low2highgid(rgid), low2highgid(egid));
47 /* avoid REGPARM breakage on x86: */ 47 /* avoid REGPARM breakage on x86: */
48 prevent_tail_call(ret); 48 asmlinkage_protect(2, ret, rgid, egid);
49 return ret; 49 return ret;
50} 50}
51 51
@@ -53,7 +53,7 @@ asmlinkage long sys_setgid16(old_gid_t gid)
53{ 53{
54 long ret = sys_setgid(low2highgid(gid)); 54 long ret = sys_setgid(low2highgid(gid));
55 /* avoid REGPARM breakage on x86: */ 55 /* avoid REGPARM breakage on x86: */
56 prevent_tail_call(ret); 56 asmlinkage_protect(1, ret, gid);
57 return ret; 57 return ret;
58} 58}
59 59
@@ -61,7 +61,7 @@ asmlinkage long sys_setreuid16(old_uid_t ruid, old_uid_t euid)
61{ 61{
62 long ret = sys_setreuid(low2highuid(ruid), low2highuid(euid)); 62 long ret = sys_setreuid(low2highuid(ruid), low2highuid(euid));
63 /* avoid REGPARM breakage on x86: */ 63 /* avoid REGPARM breakage on x86: */
64 prevent_tail_call(ret); 64 asmlinkage_protect(2, ret, ruid, euid);
65 return ret; 65 return ret;
66} 66}
67 67
@@ -69,7 +69,7 @@ asmlinkage long sys_setuid16(old_uid_t uid)
69{ 69{
70 long ret = sys_setuid(low2highuid(uid)); 70 long ret = sys_setuid(low2highuid(uid));
71 /* avoid REGPARM breakage on x86: */ 71 /* avoid REGPARM breakage on x86: */
72 prevent_tail_call(ret); 72 asmlinkage_protect(1, ret, uid);
73 return ret; 73 return ret;
74} 74}
75 75
@@ -78,7 +78,7 @@ asmlinkage long sys_setresuid16(old_uid_t ruid, old_uid_t euid, old_uid_t suid)
78 long ret = sys_setresuid(low2highuid(ruid), low2highuid(euid), 78 long ret = sys_setresuid(low2highuid(ruid), low2highuid(euid),
79 low2highuid(suid)); 79 low2highuid(suid));
80 /* avoid REGPARM breakage on x86: */ 80 /* avoid REGPARM breakage on x86: */
81 prevent_tail_call(ret); 81 asmlinkage_protect(3, ret, ruid, euid, suid);
82 return ret; 82 return ret;
83} 83}
84 84
@@ -98,7 +98,7 @@ asmlinkage long sys_setresgid16(old_gid_t rgid, old_gid_t egid, old_gid_t sgid)
98 long ret = sys_setresgid(low2highgid(rgid), low2highgid(egid), 98 long ret = sys_setresgid(low2highgid(rgid), low2highgid(egid),
99 low2highgid(sgid)); 99 low2highgid(sgid));
100 /* avoid REGPARM breakage on x86: */ 100 /* avoid REGPARM breakage on x86: */
101 prevent_tail_call(ret); 101 asmlinkage_protect(3, ret, rgid, egid, sgid);
102 return ret; 102 return ret;
103} 103}
104 104
@@ -117,7 +117,7 @@ asmlinkage long sys_setfsuid16(old_uid_t uid)
117{ 117{
118 long ret = sys_setfsuid(low2highuid(uid)); 118 long ret = sys_setfsuid(low2highuid(uid));
119 /* avoid REGPARM breakage on x86: */ 119 /* avoid REGPARM breakage on x86: */
120 prevent_tail_call(ret); 120 asmlinkage_protect(1, ret, uid);
121 return ret; 121 return ret;
122} 122}
123 123
@@ -125,7 +125,7 @@ asmlinkage long sys_setfsgid16(old_gid_t gid)
125{ 125{
126 long ret = sys_setfsgid(low2highgid(gid)); 126 long ret = sys_setfsgid(low2highgid(gid));
127 /* avoid REGPARM breakage on x86: */ 127 /* avoid REGPARM breakage on x86: */
128 prevent_tail_call(ret); 128 asmlinkage_protect(1, ret, gid);
129 return ret; 129 return ret;
130} 130}
131 131