aboutsummaryrefslogtreecommitdiff
path: root/kernel
diff options
context:
space:
mode:
authorNicolas Pitre <nicolas.pitre@linaro.org>2011-10-19 14:22:34 -0400
committerNicolas Pitre <nicolas.pitre@linaro.org>2011-10-19 14:22:34 -0400
commit2972bf78c18e5084a90980cbba106f53a09427ab (patch)
treee5c539f48d5e90132a8eb44c6ff04c324eac285e /kernel
parented569f46a07bb2089138292df8faa8e3d583b577 (diff)
parente4fcd69c9e4e273352e0f87cabd9648606da0c3e (diff)
downloadlinux-linaro-precise-2972bf78c18e5084a90980cbba106f53a09427ab.tar.gz
Merge commit 'v3.1-rc10-9-ge4fcd69' into linaro-3.1
Diffstat (limited to 'kernel')
-rw-r--r--kernel/posix-cpu-timers.c7
-rw-r--r--kernel/sys.c2
2 files changed, 5 insertions, 4 deletions
diff --git a/kernel/posix-cpu-timers.c b/kernel/posix-cpu-timers.c
index c8008dd58ef..640ded8f5c4 100644
--- a/kernel/posix-cpu-timers.c
+++ b/kernel/posix-cpu-timers.c
@@ -274,9 +274,7 @@ void thread_group_cputimer(struct task_struct *tsk, struct task_cputime *times)
struct task_cputime sum;
unsigned long flags;
- spin_lock_irqsave(&cputimer->lock, flags);
if (!cputimer->running) {
- cputimer->running = 1;
/*
* The POSIX timer interface allows for absolute time expiry
* values through the TIMER_ABSTIME flag, therefore we have
@@ -284,8 +282,11 @@ void thread_group_cputimer(struct task_struct *tsk, struct task_cputime *times)
* it.
*/
thread_group_cputime(tsk, &sum);
+ spin_lock_irqsave(&cputimer->lock, flags);
+ cputimer->running = 1;
update_gt_cputime(&cputimer->cputime, &sum);
- }
+ } else
+ spin_lock_irqsave(&cputimer->lock, flags);
*times = cputimer->cputime;
spin_unlock_irqrestore(&cputimer->lock, flags);
}
diff --git a/kernel/sys.c b/kernel/sys.c
index 18ee1d2f647..1dbbe695a5e 100644
--- a/kernel/sys.c
+++ b/kernel/sys.c
@@ -1172,7 +1172,7 @@ DECLARE_RWSEM(uts_sem);
static int override_release(char __user *release, int len)
{
int ret = 0;
- char buf[len];
+ char buf[65];
if (current->personality & UNAME26) {
char *rest = UTS_RELEASE;