diff options
Diffstat (limited to 'kernel')
| -rw-r--r-- | kernel/capability.c | 21 | ||||
| -rw-r--r-- | kernel/hrtimer.c | 8 | ||||
| -rw-r--r-- | kernel/softlockup.c | 1 | ||||
| -rw-r--r-- | kernel/workqueue.c | 2 |
4 files changed, 31 insertions, 1 deletions
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/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> |
