Merge branch 'perf/urgent' into perf/core, to pick up fixes before adding more changes
Signed-off-by: Ingo Molnar <mingo@kernel.org>
This commit is contained in:
@@ -1223,7 +1223,7 @@ static int update_nodemask(struct cpuset *cs, struct cpuset *trialcs,
|
||||
spin_unlock_irq(&callback_lock);
|
||||
|
||||
/* use trialcs->mems_allowed as a temp variable */
|
||||
update_nodemasks_hier(cs, &cs->mems_allowed);
|
||||
update_nodemasks_hier(cs, &trialcs->mems_allowed);
|
||||
done:
|
||||
return retval;
|
||||
}
|
||||
|
||||
@@ -97,6 +97,7 @@ bool kthread_should_park(void)
|
||||
{
|
||||
return test_bit(KTHREAD_SHOULD_PARK, &to_kthread(current)->flags);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(kthread_should_park);
|
||||
|
||||
/**
|
||||
* kthread_freezable_should_stop - should this freezable kthread return now?
|
||||
@@ -171,6 +172,7 @@ void kthread_parkme(void)
|
||||
{
|
||||
__kthread_parkme(to_kthread(current));
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(kthread_parkme);
|
||||
|
||||
static int kthread(void *_create)
|
||||
{
|
||||
@@ -411,6 +413,7 @@ void kthread_unpark(struct task_struct *k)
|
||||
if (kthread)
|
||||
__kthread_unpark(k, kthread);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(kthread_unpark);
|
||||
|
||||
/**
|
||||
* kthread_park - park a thread created by kthread_create().
|
||||
@@ -441,6 +444,7 @@ int kthread_park(struct task_struct *k)
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(kthread_park);
|
||||
|
||||
/**
|
||||
* kthread_stop - stop a thread created by kthread_create().
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
|
||||
#include <linux/hash.h>
|
||||
#include <linux/bootmem.h>
|
||||
#include <linux/debug_locks.h>
|
||||
|
||||
/*
|
||||
* Implement paravirt qspinlocks; the general idea is to halt the vcpus instead
|
||||
@@ -286,15 +287,23 @@ __visible void __pv_queued_spin_unlock(struct qspinlock *lock)
|
||||
{
|
||||
struct __qspinlock *l = (void *)lock;
|
||||
struct pv_node *node;
|
||||
u8 lockval = cmpxchg(&l->locked, _Q_LOCKED_VAL, 0);
|
||||
|
||||
/*
|
||||
* We must not unlock if SLOW, because in that case we must first
|
||||
* unhash. Otherwise it would be possible to have multiple @lock
|
||||
* entries, which would be BAD.
|
||||
*/
|
||||
if (likely(cmpxchg(&l->locked, _Q_LOCKED_VAL, 0) == _Q_LOCKED_VAL))
|
||||
if (likely(lockval == _Q_LOCKED_VAL))
|
||||
return;
|
||||
|
||||
if (unlikely(lockval != _Q_SLOW_VAL)) {
|
||||
if (debug_locks_silent)
|
||||
return;
|
||||
WARN(1, "pvqspinlock: lock %p has corrupted value 0x%x!\n", lock, atomic_read(&lock->val));
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
* Since the above failed to release, this must be the SLOW path.
|
||||
* Therefore start by looking up the blocked node and unhashing it.
|
||||
|
||||
@@ -602,13 +602,16 @@ const struct kernel_symbol *find_symbol(const char *name,
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(find_symbol);
|
||||
|
||||
/* Search for module by name: must hold module_mutex. */
|
||||
/*
|
||||
* Search for module by name: must hold module_mutex (or preempt disabled
|
||||
* for read-only access).
|
||||
*/
|
||||
static struct module *find_module_all(const char *name, size_t len,
|
||||
bool even_unformed)
|
||||
{
|
||||
struct module *mod;
|
||||
|
||||
module_assert_mutex();
|
||||
module_assert_mutex_or_preempt();
|
||||
|
||||
list_for_each_entry(mod, &modules, list) {
|
||||
if (!even_unformed && mod->state == MODULE_STATE_UNFORMED)
|
||||
@@ -621,6 +624,7 @@ static struct module *find_module_all(const char *name, size_t len,
|
||||
|
||||
struct module *find_module(const char *name)
|
||||
{
|
||||
module_assert_mutex();
|
||||
return find_module_all(name, strlen(name), false);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(find_module);
|
||||
|
||||
@@ -2748,12 +2748,15 @@ int copy_siginfo_to_user(siginfo_t __user *to, const siginfo_t *from)
|
||||
* Other callers might not initialize the si_lsb field,
|
||||
* so check explicitly for the right codes here.
|
||||
*/
|
||||
if (from->si_code == BUS_MCEERR_AR || from->si_code == BUS_MCEERR_AO)
|
||||
if (from->si_signo == SIGBUS &&
|
||||
(from->si_code == BUS_MCEERR_AR || from->si_code == BUS_MCEERR_AO))
|
||||
err |= __put_user(from->si_addr_lsb, &to->si_addr_lsb);
|
||||
#endif
|
||||
#ifdef SEGV_BNDERR
|
||||
err |= __put_user(from->si_lower, &to->si_lower);
|
||||
err |= __put_user(from->si_upper, &to->si_upper);
|
||||
if (from->si_signo == SIGSEGV && from->si_code == SEGV_BNDERR) {
|
||||
err |= __put_user(from->si_lower, &to->si_lower);
|
||||
err |= __put_user(from->si_upper, &to->si_upper);
|
||||
}
|
||||
#endif
|
||||
break;
|
||||
case __SI_CHLD:
|
||||
@@ -3017,7 +3020,7 @@ COMPAT_SYSCALL_DEFINE3(rt_sigqueueinfo,
|
||||
int, sig,
|
||||
struct compat_siginfo __user *, uinfo)
|
||||
{
|
||||
siginfo_t info;
|
||||
siginfo_t info = {};
|
||||
int ret = copy_siginfo_from_user32(&info, uinfo);
|
||||
if (unlikely(ret))
|
||||
return ret;
|
||||
@@ -3061,7 +3064,7 @@ COMPAT_SYSCALL_DEFINE4(rt_tgsigqueueinfo,
|
||||
int, sig,
|
||||
struct compat_siginfo __user *, uinfo)
|
||||
{
|
||||
siginfo_t info;
|
||||
siginfo_t info = {};
|
||||
|
||||
if (copy_siginfo_from_user32(&info, uinfo))
|
||||
return -EFAULT;
|
||||
|
||||
Reference in New Issue
Block a user