/[linux-patches]/genpatches-2.6/trunk/2.6.14/1441_15.5_cleanup-sa_mask-before-do_sigaction.patch
Gentoo

Contents of /genpatches-2.6/trunk/2.6.14/1441_15.5_cleanup-sa_mask-before-do_sigaction.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 328 - (hide annotations) (download) (as text)
Tue Mar 14 13:34:17 2006 UTC (14 years, 8 months ago) by johnm
File MIME type: text/x-diff
File size: 2354 byte(s)
2.6.14-11, rebase against local tree
1 johnm 328 From: Oleg Nesterov <oleg@tv-sign.ru>
2     Date: Thu, 9 Feb 2006 19:41:50 +0000 (+0300)
3     Subject: [PATCH] do_sigaction: cleanup ->sa_mask manipulation
4     X-Git-Url: http://www.kernel.org/git/?p=linux/kernel/git/chrisw/linux-2.6.15.y.git;a=commitdiff;h=d5ab647575aac6b58a3bfb1d670caf4c7c8d47c2
5    
6     [PATCH] do_sigaction: cleanup ->sa_mask manipulation
7    
8     Clear unblockable signals beforehand.
9    
10     Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru>
11     Signed-off-by: Linus Torvalds <torvalds@osdl.org>
12     Signed-off-by: Chris Wright <chrisw@sous-sol.org>
13     Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14     ---
15    
16     --- a/include/linux/sched.h
17     +++ b/include/linux/sched.h
18     @@ -1075,7 +1075,7 @@ extern struct sigqueue *sigqueue_alloc(v
19     extern void sigqueue_free(struct sigqueue *);
20     extern int send_sigqueue(int, struct sigqueue *, struct task_struct *);
21     extern int send_group_sigqueue(int, struct sigqueue *, struct task_struct *);
22     -extern int do_sigaction(int, const struct k_sigaction *, struct k_sigaction *);
23     +extern int do_sigaction(int, struct k_sigaction *, struct k_sigaction *);
24     extern int do_sigaltstack(const stack_t __user *, stack_t __user *, unsigned long);
25    
26     /* These can be the second arg to send_sig_info/send_group_sig_info. */
27     --- a/kernel/signal.c
28     +++ b/kernel/signal.c
29     @@ -2335,7 +2335,7 @@ sys_rt_sigqueueinfo(int pid, int sig, si
30     }
31    
32     int
33     -do_sigaction(int sig, const struct k_sigaction *act, struct k_sigaction *oact)
34     +do_sigaction(int sig, struct k_sigaction *act, struct k_sigaction *oact)
35     {
36     struct k_sigaction *k;
37    
38     @@ -2358,6 +2358,8 @@ do_sigaction(int sig, const struct k_sig
39     *oact = *k;
40    
41     if (act) {
42     + sigdelsetmask(&act->sa.sa_mask,
43     + sigmask(SIGKILL) | sigmask(SIGSTOP));
44     /*
45     * POSIX 3.3.1.3:
46     * "Setting a signal action to SIG_IGN for a signal that is
47     @@ -2383,8 +2385,6 @@ do_sigaction(int sig, const struct k_sig
48     read_lock(&tasklist_lock);
49     spin_lock_irq(&t->sighand->siglock);
50     *k = *act;
51     - sigdelsetmask(&k->sa.sa_mask,
52     - sigmask(SIGKILL) | sigmask(SIGSTOP));
53     rm_from_queue(sigmask(sig), &t->signal->shared_pending);
54     do {
55     rm_from_queue(sigmask(sig), &t->pending);
56     @@ -2397,8 +2397,6 @@ do_sigaction(int sig, const struct k_sig
57     }
58    
59     *k = *act;
60     - sigdelsetmask(&k->sa.sa_mask,
61     - sigmask(SIGKILL) | sigmask(SIGSTOP));
62     }
63    
64     spin_unlock_irq(&current->sighand->siglock);

  ViewVC Help
Powered by ViewVC 1.1.20