aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'kernel')
-rw-r--r--kernel/cred.c4
-rw-r--r--kernel/rcupdate.c7
-rw-r--r--kernel/sched.c8
-rw-r--r--kernel/sys.c2
-rw-r--r--kernel/trace/ftrace.c3
-rw-r--r--kernel/trace/trace_sched_switch.c5
-rw-r--r--kernel/trace/trace_sched_wakeup.c5
7 files changed, 19 insertions, 15 deletions
diff --git a/kernel/cred.c b/kernel/cred.c
index 4f483be5944c..8f3672a58a1e 100644
--- a/kernel/cred.c
+++ b/kernel/cred.c
@@ -397,6 +397,8 @@ struct cred *prepare_usermodehelper_creds(void)
397 397
398error: 398error:
399 put_cred(new); 399 put_cred(new);
400 return NULL;
401
400free_tgcred: 402free_tgcred:
401#ifdef CONFIG_KEYS 403#ifdef CONFIG_KEYS
402 kfree(tgcred); 404 kfree(tgcred);
@@ -788,8 +790,6 @@ bool creds_are_invalid(const struct cred *cred)
788{ 790{
789 if (cred->magic != CRED_MAGIC) 791 if (cred->magic != CRED_MAGIC)
790 return true; 792 return true;
791 if (atomic_read(&cred->usage) < atomic_read(&cred->subscribers))
792 return true;
793#ifdef CONFIG_SECURITY_SELINUX 793#ifdef CONFIG_SECURITY_SELINUX
794 if (selinux_is_enabled()) { 794 if (selinux_is_enabled()) {
795 if ((unsigned long) cred->security < PAGE_SIZE) 795 if ((unsigned long) cred->security < PAGE_SIZE)
diff --git a/kernel/rcupdate.c b/kernel/rcupdate.c
index 63fe25433980..03a7ea1579f6 100644
--- a/kernel/rcupdate.c
+++ b/kernel/rcupdate.c
@@ -69,6 +69,13 @@ EXPORT_SYMBOL_GPL(rcu_scheduler_active);
69 69
70#ifdef CONFIG_DEBUG_LOCK_ALLOC 70#ifdef CONFIG_DEBUG_LOCK_ALLOC
71 71
72int debug_lockdep_rcu_enabled(void)
73{
74 return rcu_scheduler_active && debug_locks &&
75 current->lockdep_recursion == 0;
76}
77EXPORT_SYMBOL_GPL(debug_lockdep_rcu_enabled);
78
72/** 79/**
73 * rcu_read_lock_bh_held - might we be in RCU-bh read-side critical section? 80 * rcu_read_lock_bh_held - might we be in RCU-bh read-side critical section?
74 * 81 *
diff --git a/kernel/sched.c b/kernel/sched.c
index fbaf3128d010..39aa9c7e22c0 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -2155,7 +2155,7 @@ unsigned long wait_task_inactive(struct task_struct *p, long match_state)
2155 * just go back and repeat. 2155 * just go back and repeat.
2156 */ 2156 */
2157 rq = task_rq_lock(p, &flags); 2157 rq = task_rq_lock(p, &flags);
2158 trace_sched_wait_task(rq, p); 2158 trace_sched_wait_task(p);
2159 running = task_running(rq, p); 2159 running = task_running(rq, p);
2160 on_rq = p->se.on_rq; 2160 on_rq = p->se.on_rq;
2161 ncsw = 0; 2161 ncsw = 0;
@@ -2426,7 +2426,7 @@ out_activate:
2426 success = 1; 2426 success = 1;
2427 2427
2428out_running: 2428out_running:
2429 trace_sched_wakeup(rq, p, success); 2429 trace_sched_wakeup(p, success);
2430 check_preempt_curr(rq, p, wake_flags); 2430 check_preempt_curr(rq, p, wake_flags);
2431 2431
2432 p->state = TASK_RUNNING; 2432 p->state = TASK_RUNNING;
@@ -2600,7 +2600,7 @@ void wake_up_new_task(struct task_struct *p, unsigned long clone_flags)
2600 2600
2601 rq = task_rq_lock(p, &flags); 2601 rq = task_rq_lock(p, &flags);
2602 activate_task(rq, p, 0); 2602 activate_task(rq, p, 0);
2603 trace_sched_wakeup_new(rq, p, 1); 2603 trace_sched_wakeup_new(p, 1);
2604 check_preempt_curr(rq, p, WF_FORK); 2604 check_preempt_curr(rq, p, WF_FORK);
2605#ifdef CONFIG_SMP 2605#ifdef CONFIG_SMP
2606 if (p->sched_class->task_woken) 2606 if (p->sched_class->task_woken)
@@ -2820,7 +2820,7 @@ context_switch(struct rq *rq, struct task_struct *prev,
2820 struct mm_struct *mm, *oldmm; 2820 struct mm_struct *mm, *oldmm;
2821 2821
2822 prepare_task_switch(rq, prev, next); 2822 prepare_task_switch(rq, prev, next);
2823 trace_sched_switch(rq, prev, next); 2823 trace_sched_switch(prev, next);
2824 mm = next->mm; 2824 mm = next->mm;
2825 oldmm = prev->active_mm; 2825 oldmm = prev->active_mm;
2826 /* 2826 /*
diff --git a/kernel/sys.c b/kernel/sys.c
index 6d1a7e0f9d5b..7cb426a58965 100644
--- a/kernel/sys.c
+++ b/kernel/sys.c
@@ -1118,7 +1118,7 @@ DECLARE_RWSEM(uts_sem);
1118 1118
1119#ifdef COMPAT_UTS_MACHINE 1119#ifdef COMPAT_UTS_MACHINE
1120#define override_architecture(name) \ 1120#define override_architecture(name) \
1121 (current->personality == PER_LINUX32 && \ 1121 (personality(current->personality) == PER_LINUX32 && \
1122 copy_to_user(name->machine, COMPAT_UTS_MACHINE, \ 1122 copy_to_user(name->machine, COMPAT_UTS_MACHINE, \
1123 sizeof(COMPAT_UTS_MACHINE))) 1123 sizeof(COMPAT_UTS_MACHINE)))
1124#else 1124#else
diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c
index 2404b59b3097..aa3a92b511e2 100644
--- a/kernel/trace/ftrace.c
+++ b/kernel/trace/ftrace.c
@@ -3212,8 +3212,7 @@ free:
3212} 3212}
3213 3213
3214static void 3214static void
3215ftrace_graph_probe_sched_switch(struct rq *__rq, struct task_struct *prev, 3215ftrace_graph_probe_sched_switch(struct task_struct *prev, struct task_struct *next)
3216 struct task_struct *next)
3217{ 3216{
3218 unsigned long long timestamp; 3217 unsigned long long timestamp;
3219 int index; 3218 int index;
diff --git a/kernel/trace/trace_sched_switch.c b/kernel/trace/trace_sched_switch.c
index 5fca0f51fde4..a55fccfede5d 100644
--- a/kernel/trace/trace_sched_switch.c
+++ b/kernel/trace/trace_sched_switch.c
@@ -50,8 +50,7 @@ tracing_sched_switch_trace(struct trace_array *tr,
50} 50}
51 51
52static void 52static void
53probe_sched_switch(struct rq *__rq, struct task_struct *prev, 53probe_sched_switch(struct task_struct *prev, struct task_struct *next)
54 struct task_struct *next)
55{ 54{
56 struct trace_array_cpu *data; 55 struct trace_array_cpu *data;
57 unsigned long flags; 56 unsigned long flags;
@@ -109,7 +108,7 @@ tracing_sched_wakeup_trace(struct trace_array *tr,
109} 108}
110 109
111static void 110static void
112probe_sched_wakeup(struct rq *__rq, struct task_struct *wakee, int success) 111probe_sched_wakeup(struct task_struct *wakee, int success)
113{ 112{
114 struct trace_array_cpu *data; 113 struct trace_array_cpu *data;
115 unsigned long flags; 114 unsigned long flags;
diff --git a/kernel/trace/trace_sched_wakeup.c b/kernel/trace/trace_sched_wakeup.c
index 0271742abb8d..8052446ceeaa 100644
--- a/kernel/trace/trace_sched_wakeup.c
+++ b/kernel/trace/trace_sched_wakeup.c
@@ -107,8 +107,7 @@ static void probe_wakeup_migrate_task(struct task_struct *task, int cpu)
107} 107}
108 108
109static void notrace 109static void notrace
110probe_wakeup_sched_switch(struct rq *rq, struct task_struct *prev, 110probe_wakeup_sched_switch(struct task_struct *prev, struct task_struct *next)
111 struct task_struct *next)
112{ 111{
113 struct trace_array_cpu *data; 112 struct trace_array_cpu *data;
114 cycle_t T0, T1, delta; 113 cycle_t T0, T1, delta;
@@ -200,7 +199,7 @@ static void wakeup_reset(struct trace_array *tr)
200} 199}
201 200
202static void 201static void
203probe_wakeup(struct rq *rq, struct task_struct *p, int success) 202probe_wakeup(struct task_struct *p, int success)
204{ 203{
205 struct trace_array_cpu *data; 204 struct trace_array_cpu *data;
206 int cpu = smp_processor_id(); 205 int cpu = smp_processor_id();