diff options
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/signal.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/kernel/signal.c b/kernel/signal.c index 825a3f24ad76..2ee9573ed11f 100644 --- a/kernel/signal.c +++ b/kernel/signal.c | |||
@@ -642,7 +642,7 @@ static inline bool si_fromuser(const struct siginfo *info) | |||
642 | static int check_kill_permission(int sig, struct siginfo *info, | 642 | static int check_kill_permission(int sig, struct siginfo *info, |
643 | struct task_struct *t) | 643 | struct task_struct *t) |
644 | { | 644 | { |
645 | const struct cred *cred = current_cred(), *tcred; | 645 | const struct cred *cred, *tcred; |
646 | struct pid *sid; | 646 | struct pid *sid; |
647 | int error; | 647 | int error; |
648 | 648 | ||
@@ -656,8 +656,10 @@ static int check_kill_permission(int sig, struct siginfo *info, | |||
656 | if (error) | 656 | if (error) |
657 | return error; | 657 | return error; |
658 | 658 | ||
659 | cred = current_cred(); | ||
659 | tcred = __task_cred(t); | 660 | tcred = __task_cred(t); |
660 | if ((cred->euid ^ tcred->suid) && | 661 | if (!same_thread_group(current, t) && |
662 | (cred->euid ^ tcred->suid) && | ||
661 | (cred->euid ^ tcred->uid) && | 663 | (cred->euid ^ tcred->uid) && |
662 | (cred->uid ^ tcred->suid) && | 664 | (cred->uid ^ tcred->suid) && |
663 | (cred->uid ^ tcred->uid) && | 665 | (cred->uid ^ tcred->uid) && |