diff options
author | Chris Wright <chrisw@osdl.org> | 2004-06-17 18:25:20 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2004-06-17 18:25:20 -0700 |
commit | cefb76b6bb7ca143dc5a84ccde9e84f0fd0fb272 (patch) | |
tree | b861d50bb5a62c14700579e64bfc55a43278b75a /kernel | |
parent | 3a948de76cd625264c6fbea172a51cf5d76cd12b (diff) | |
download | history-cefb76b6bb7ca143dc5a84ccde9e84f0fd0fb272.tar.gz |
[PATCH] RLIM: pass task_struct in send_signal()
Update send_signal() api to allow passing the task receiving the signal. This
is necessary to ensure signals generated out of process context can be charged
to the correct user.
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/signal.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/kernel/signal.c b/kernel/signal.c index d1b3e9250f3796..dcc6477f77ff04 100644 --- a/kernel/signal.c +++ b/kernel/signal.c @@ -699,7 +699,8 @@ static void handle_stop_signal(int sig, struct task_struct *p) } } -static int send_signal(int sig, struct siginfo *info, struct sigpending *signals) +static int send_signal(int sig, struct siginfo *info, struct task_struct *t, + struct sigpending *signals) { struct sigqueue * q = NULL; int ret = 0; @@ -798,7 +799,7 @@ specific_send_sig_info(int sig, struct siginfo *info, struct task_struct *t) if (LEGACY_QUEUE(&t->pending, sig)) goto out; - ret = send_signal(sig, info, &t->pending); + ret = send_signal(sig, info, t, &t->pending); if (!ret && !sigismember(&t->blocked, sig)) signal_wake_up(t, sig == SIGKILL); out: @@ -999,7 +1000,7 @@ __group_send_sig_info(int sig, struct siginfo *info, struct task_struct *p) * We always use the shared queue for process-wide signals, * to avoid several races. */ - ret = send_signal(sig, info, &p->signal->shared_pending); + ret = send_signal(sig, info, p, &p->signal->shared_pending); if (unlikely(ret)) return ret; |