aboutsummaryrefslogtreecommitdiff
path: root/kernel
diff options
context:
space:
mode:
authorNicolas Pitre <nicolas.pitre@linaro.org>2011-04-14 22:54:21 -0400
committerNicolas Pitre <nicolas.pitre@linaro.org>2011-04-14 22:54:21 -0400
commit3ec10cd8b526c6b10170c2649002672ee2019e73 (patch)
tree27e3fb26020877ae43d3bcc5996c058957df3dc3 /kernel
parent993916203f00e8c62599466a5caa866e09f0fae3 (diff)
parent1be99f6c95e6c887756f789a60d15771235acd0c (diff)
downloadlinux-linaro-android-3ec10cd8b526c6b10170c2649002672ee2019e73.tar.gz
Merge commit 'v2.6.38.3' into linaro-2.6.38
Diffstat (limited to 'kernel')
-rw-r--r--kernel/perf_event.c8
-rw-r--r--kernel/signal.c4
2 files changed, 9 insertions, 3 deletions
diff --git a/kernel/perf_event.c b/kernel/perf_event.c
index ad02feadb6b..b2536bd2b6b 100644
--- a/kernel/perf_event.c
+++ b/kernel/perf_event.c
@@ -62,7 +62,8 @@ static struct srcu_struct pmus_srcu;
*/
int sysctl_perf_event_paranoid __read_mostly = 1;
-int sysctl_perf_event_mlock __read_mostly = 512; /* 'free' kb per user */
+/* Minimum for 512 kiB + 1 user control page */
+int sysctl_perf_event_mlock __read_mostly = 512 + (PAGE_SIZE / 1024); /* 'free' kiB per user */
/*
* max perf event sample rate
@@ -5916,6 +5917,11 @@ SYSCALL_DEFINE5(perf_event_open,
goto err_alloc;
}
+ if (task) {
+ put_task_struct(task);
+ task = NULL;
+ }
+
/*
* Look up the group leader (we will attach this event to it):
*/
diff --git a/kernel/signal.c b/kernel/signal.c
index 31751868de8..bf11d2697e9 100644
--- a/kernel/signal.c
+++ b/kernel/signal.c
@@ -2423,7 +2423,7 @@ SYSCALL_DEFINE3(rt_sigqueueinfo, pid_t, pid, int, sig,
/* Not even root can pretend to send signals from the kernel.
* Nor can they impersonate a kill()/tgkill(), which adds source info.
*/
- if (info.si_code != SI_QUEUE) {
+ if (info.si_code >= 0 || info.si_code == SI_TKILL) {
/* We used to allow any < 0 si_code */
WARN_ON_ONCE(info.si_code < 0);
return -EPERM;
@@ -2443,7 +2443,7 @@ long do_rt_tgsigqueueinfo(pid_t tgid, pid_t pid, int sig, siginfo_t *info)
/* Not even root can pretend to send signals from the kernel.
* Nor can they impersonate a kill()/tgkill(), which adds source info.
*/
- if (info->si_code != SI_QUEUE) {
+ if (info->si_code >= 0 || info->si_code == SI_TKILL) {
/* We used to allow any < 0 si_code */
WARN_ON_ONCE(info->si_code < 0);
return -EPERM;