diff options
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/audit.c | 6 | ||||
-rw-r--r-- | kernel/auditfilter.c | 3 | ||||
-rw-r--r-- | kernel/capability.c | 21 | ||||
-rw-r--r-- | kernel/hrtimer.c | 8 | ||||
-rw-r--r-- | kernel/kprobes.c | 2 | ||||
-rw-r--r-- | kernel/printk.c | 2 | ||||
-rw-r--r-- | kernel/rcuclassic.c | 16 | ||||
-rw-r--r-- | kernel/rcupreempt.c | 20 | ||||
-rw-r--r-- | kernel/softlockup.c | 1 | ||||
-rw-r--r-- | kernel/workqueue.c | 2 |
10 files changed, 61 insertions, 20 deletions
diff --git a/kernel/audit.c b/kernel/audit.c index e8692a5748c2..e092f1c0ce30 100644 --- a/kernel/audit.c +++ b/kernel/audit.c | |||
@@ -738,7 +738,7 @@ static int audit_receive_msg(struct sk_buff *skb, struct nlmsghdr *nlh) | |||
738 | if (!audit_enabled && msg_type != AUDIT_USER_AVC) | 738 | if (!audit_enabled && msg_type != AUDIT_USER_AVC) |
739 | return 0; | 739 | return 0; |
740 | 740 | ||
741 | err = audit_filter_user(&NETLINK_CB(skb), msg_type); | 741 | err = audit_filter_user(&NETLINK_CB(skb)); |
742 | if (err == 1) { | 742 | if (err == 1) { |
743 | err = 0; | 743 | err = 0; |
744 | if (msg_type == AUDIT_USER_TTY) { | 744 | if (msg_type == AUDIT_USER_TTY) { |
@@ -779,7 +779,7 @@ static int audit_receive_msg(struct sk_buff *skb, struct nlmsghdr *nlh) | |||
779 | } | 779 | } |
780 | /* fallthrough */ | 780 | /* fallthrough */ |
781 | case AUDIT_LIST: | 781 | case AUDIT_LIST: |
782 | err = audit_receive_filter(nlh->nlmsg_type, NETLINK_CB(skb).pid, | 782 | err = audit_receive_filter(msg_type, NETLINK_CB(skb).pid, |
783 | uid, seq, data, nlmsg_len(nlh), | 783 | uid, seq, data, nlmsg_len(nlh), |
784 | loginuid, sessionid, sid); | 784 | loginuid, sessionid, sid); |
785 | break; | 785 | break; |
@@ -798,7 +798,7 @@ static int audit_receive_msg(struct sk_buff *skb, struct nlmsghdr *nlh) | |||
798 | } | 798 | } |
799 | /* fallthrough */ | 799 | /* fallthrough */ |
800 | case AUDIT_LIST_RULES: | 800 | case AUDIT_LIST_RULES: |
801 | err = audit_receive_filter(nlh->nlmsg_type, NETLINK_CB(skb).pid, | 801 | err = audit_receive_filter(msg_type, NETLINK_CB(skb).pid, |
802 | uid, seq, data, nlmsg_len(nlh), | 802 | uid, seq, data, nlmsg_len(nlh), |
803 | loginuid, sessionid, sid); | 803 | loginuid, sessionid, sid); |
804 | break; | 804 | break; |
diff --git a/kernel/auditfilter.c b/kernel/auditfilter.c index 0e0bd27e6512..98c50cc671bb 100644 --- a/kernel/auditfilter.c +++ b/kernel/auditfilter.c | |||
@@ -1544,6 +1544,7 @@ static void audit_log_rule_change(uid_t loginuid, u32 sessionid, u32 sid, | |||
1544 | * @data: payload data | 1544 | * @data: payload data |
1545 | * @datasz: size of payload data | 1545 | * @datasz: size of payload data |
1546 | * @loginuid: loginuid of sender | 1546 | * @loginuid: loginuid of sender |
1547 | * @sessionid: sessionid for netlink audit message | ||
1547 | * @sid: SE Linux Security ID of sender | 1548 | * @sid: SE Linux Security ID of sender |
1548 | */ | 1549 | */ |
1549 | int audit_receive_filter(int type, int pid, int uid, int seq, void *data, | 1550 | int audit_receive_filter(int type, int pid, int uid, int seq, void *data, |
@@ -1720,7 +1721,7 @@ static int audit_filter_user_rules(struct netlink_skb_parms *cb, | |||
1720 | return 1; | 1721 | return 1; |
1721 | } | 1722 | } |
1722 | 1723 | ||
1723 | int audit_filter_user(struct netlink_skb_parms *cb, int type) | 1724 | int audit_filter_user(struct netlink_skb_parms *cb) |
1724 | { | 1725 | { |
1725 | enum audit_state state = AUDIT_DISABLED; | 1726 | enum audit_state state = AUDIT_DISABLED; |
1726 | struct audit_entry *e; | 1727 | struct audit_entry *e; |
diff --git a/kernel/capability.c b/kernel/capability.c index cfbe44299488..901e0fdc3fff 100644 --- a/kernel/capability.c +++ b/kernel/capability.c | |||
@@ -121,6 +121,27 @@ static int cap_validate_magic(cap_user_header_t header, unsigned *tocopy) | |||
121 | * uninteresting and/or not to be changed. | 121 | * uninteresting and/or not to be changed. |
122 | */ | 122 | */ |
123 | 123 | ||
124 | /* | ||
125 | * Atomically modify the effective capabilities returning the original | ||
126 | * value. No permission check is performed here - it is assumed that the | ||
127 | * caller is permitted to set the desired effective capabilities. | ||
128 | */ | ||
129 | kernel_cap_t cap_set_effective(const kernel_cap_t pE_new) | ||
130 | { | ||
131 | kernel_cap_t pE_old; | ||
132 | |||
133 | spin_lock(&task_capability_lock); | ||
134 | |||
135 | pE_old = current->cap_effective; | ||
136 | current->cap_effective = pE_new; | ||
137 | |||
138 | spin_unlock(&task_capability_lock); | ||
139 | |||
140 | return pE_old; | ||
141 | } | ||
142 | |||
143 | EXPORT_SYMBOL(cap_set_effective); | ||
144 | |||
124 | /** | 145 | /** |
125 | * sys_capget - get the capabilities of a given process. | 146 | * sys_capget - get the capabilities of a given process. |
126 | * @header: pointer to struct that contains capability version and | 147 | * @header: pointer to struct that contains capability version and |
diff --git a/kernel/hrtimer.c b/kernel/hrtimer.c index 421be5fe5cc7..ab80515008f4 100644 --- a/kernel/hrtimer.c +++ b/kernel/hrtimer.c | |||
@@ -1003,10 +1003,18 @@ hrtimer_start(struct hrtimer *timer, ktime_t tim, const enum hrtimer_mode mode) | |||
1003 | */ | 1003 | */ |
1004 | raise = timer->state == HRTIMER_STATE_PENDING; | 1004 | raise = timer->state == HRTIMER_STATE_PENDING; |
1005 | 1005 | ||
1006 | /* | ||
1007 | * We use preempt_disable to prevent this task from migrating after | ||
1008 | * setting up the softirq and raising it. Otherwise, if me migrate | ||
1009 | * we will raise the softirq on the wrong CPU. | ||
1010 | */ | ||
1011 | preempt_disable(); | ||
1012 | |||
1006 | unlock_hrtimer_base(timer, &flags); | 1013 | unlock_hrtimer_base(timer, &flags); |
1007 | 1014 | ||
1008 | if (raise) | 1015 | if (raise) |
1009 | hrtimer_raise_softirq(); | 1016 | hrtimer_raise_softirq(); |
1017 | preempt_enable(); | ||
1010 | 1018 | ||
1011 | return ret; | 1019 | return ret; |
1012 | } | 1020 | } |
diff --git a/kernel/kprobes.c b/kernel/kprobes.c index d4998f81e229..1485ca8d0e00 100644 --- a/kernel/kprobes.c +++ b/kernel/kprobes.c | |||
@@ -79,7 +79,7 @@ static DEFINE_PER_CPU(struct kprobe *, kprobe_instance) = NULL; | |||
79 | * | 79 | * |
80 | * For such cases, we now have a blacklist | 80 | * For such cases, we now have a blacklist |
81 | */ | 81 | */ |
82 | struct kprobe_blackpoint kprobe_blacklist[] = { | 82 | static struct kprobe_blackpoint kprobe_blacklist[] = { |
83 | {"preempt_schedule",}, | 83 | {"preempt_schedule",}, |
84 | {NULL} /* Terminator */ | 84 | {NULL} /* Terminator */ |
85 | }; | 85 | }; |
diff --git a/kernel/printk.c b/kernel/printk.c index 8fb01c32aa3b..e2129e83fd75 100644 --- a/kernel/printk.c +++ b/kernel/printk.c | |||
@@ -666,7 +666,7 @@ static int acquire_console_semaphore_for_printk(unsigned int cpu) | |||
666 | return retval; | 666 | return retval; |
667 | } | 667 | } |
668 | 668 | ||
669 | const char printk_recursion_bug_msg [] = | 669 | static const char printk_recursion_bug_msg [] = |
670 | KERN_CRIT "BUG: recent printk recursion!\n"; | 670 | KERN_CRIT "BUG: recent printk recursion!\n"; |
671 | static int printk_recursion_bug; | 671 | static int printk_recursion_bug; |
672 | 672 | ||
diff --git a/kernel/rcuclassic.c b/kernel/rcuclassic.c index f4ffbd0f306f..a38895a5b8e2 100644 --- a/kernel/rcuclassic.c +++ b/kernel/rcuclassic.c | |||
@@ -89,8 +89,22 @@ static void force_quiescent_state(struct rcu_data *rdp, | |||
89 | /* | 89 | /* |
90 | * Don't send IPI to itself. With irqs disabled, | 90 | * Don't send IPI to itself. With irqs disabled, |
91 | * rdp->cpu is the current cpu. | 91 | * rdp->cpu is the current cpu. |
92 | * | ||
93 | * cpu_online_map is updated by the _cpu_down() | ||
94 | * using stop_machine_run(). Since we're in irqs disabled | ||
95 | * section, stop_machine_run() is not exectuting, hence | ||
96 | * the cpu_online_map is stable. | ||
97 | * | ||
98 | * However, a cpu might have been offlined _just_ before | ||
99 | * we disabled irqs while entering here. | ||
100 | * And rcu subsystem might not yet have handled the CPU_DEAD | ||
101 | * notification, leading to the offlined cpu's bit | ||
102 | * being set in the rcp->cpumask. | ||
103 | * | ||
104 | * Hence cpumask = (rcp->cpumask & cpu_online_map) to prevent | ||
105 | * sending smp_reschedule() to an offlined CPU. | ||
92 | */ | 106 | */ |
93 | cpumask = rcp->cpumask; | 107 | cpus_and(cpumask, rcp->cpumask, cpu_online_map); |
94 | cpu_clear(rdp->cpu, cpumask); | 108 | cpu_clear(rdp->cpu, cpumask); |
95 | for_each_cpu_mask(cpu, cpumask) | 109 | for_each_cpu_mask(cpu, cpumask) |
96 | smp_send_reschedule(cpu); | 110 | smp_send_reschedule(cpu); |
diff --git a/kernel/rcupreempt.c b/kernel/rcupreempt.c index 5e02b7740702..41d275a81df5 100644 --- a/kernel/rcupreempt.c +++ b/kernel/rcupreempt.c | |||
@@ -925,26 +925,22 @@ void rcu_offline_cpu(int cpu) | |||
925 | spin_unlock_irqrestore(&rdp->lock, flags); | 925 | spin_unlock_irqrestore(&rdp->lock, flags); |
926 | } | 926 | } |
927 | 927 | ||
928 | void __devinit rcu_online_cpu(int cpu) | ||
929 | { | ||
930 | unsigned long flags; | ||
931 | |||
932 | spin_lock_irqsave(&rcu_ctrlblk.fliplock, flags); | ||
933 | cpu_set(cpu, rcu_cpu_online_map); | ||
934 | spin_unlock_irqrestore(&rcu_ctrlblk.fliplock, flags); | ||
935 | } | ||
936 | |||
937 | #else /* #ifdef CONFIG_HOTPLUG_CPU */ | 928 | #else /* #ifdef CONFIG_HOTPLUG_CPU */ |
938 | 929 | ||
939 | void rcu_offline_cpu(int cpu) | 930 | void rcu_offline_cpu(int cpu) |
940 | { | 931 | { |
941 | } | 932 | } |
942 | 933 | ||
943 | void __devinit rcu_online_cpu(int cpu) | 934 | #endif /* #else #ifdef CONFIG_HOTPLUG_CPU */ |
935 | |||
936 | void __cpuinit rcu_online_cpu(int cpu) | ||
944 | { | 937 | { |
945 | } | 938 | unsigned long flags; |
946 | 939 | ||
947 | #endif /* #else #ifdef CONFIG_HOTPLUG_CPU */ | 940 | spin_lock_irqsave(&rcu_ctrlblk.fliplock, flags); |
941 | cpu_set(cpu, rcu_cpu_online_map); | ||
942 | spin_unlock_irqrestore(&rcu_ctrlblk.fliplock, flags); | ||
943 | } | ||
948 | 944 | ||
949 | static void rcu_process_callbacks(struct softirq_action *unused) | 945 | static void rcu_process_callbacks(struct softirq_action *unused) |
950 | { | 946 | { |
diff --git a/kernel/softlockup.c b/kernel/softlockup.c index c828c2339cc9..a272d78185eb 100644 --- a/kernel/softlockup.c +++ b/kernel/softlockup.c | |||
@@ -120,6 +120,7 @@ void softlockup_tick(void) | |||
120 | printk(KERN_ERR "BUG: soft lockup - CPU#%d stuck for %lus! [%s:%d]\n", | 120 | printk(KERN_ERR "BUG: soft lockup - CPU#%d stuck for %lus! [%s:%d]\n", |
121 | this_cpu, now - touch_timestamp, | 121 | this_cpu, now - touch_timestamp, |
122 | current->comm, task_pid_nr(current)); | 122 | current->comm, task_pid_nr(current)); |
123 | print_modules(); | ||
123 | if (regs) | 124 | if (regs) |
124 | show_regs(regs); | 125 | show_regs(regs); |
125 | else | 126 | else |
diff --git a/kernel/workqueue.c b/kernel/workqueue.c index 29fc39f1029c..ce7799540c91 100644 --- a/kernel/workqueue.c +++ b/kernel/workqueue.c | |||
@@ -13,7 +13,7 @@ | |||
13 | * Kai Petzke <wpp@marie.physik.tu-berlin.de> | 13 | * Kai Petzke <wpp@marie.physik.tu-berlin.de> |
14 | * Theodore Ts'o <tytso@mit.edu> | 14 | * Theodore Ts'o <tytso@mit.edu> |
15 | * | 15 | * |
16 | * Made to use alloc_percpu by Christoph Lameter <clameter@sgi.com>. | 16 | * Made to use alloc_percpu by Christoph Lameter. |
17 | */ | 17 | */ |
18 | 18 | ||
19 | #include <linux/module.h> | 19 | #include <linux/module.h> |