From: "Paul E. McKenney" <paulmck@us.ibm.com>
To: mingo@elte.hu
Cc: linux-kernel@vger.kernel.org, oleg@tv-sign.ru,
dipankar@in.ibm.com, suzannew@cs.pdx.edu, akpm@osdl.org
Subject: [PATCH] Fixes for RCU handling of sighand_struct
Date: Mon, 31 Oct 2005 21:49:31 -0800 [thread overview]
Message-ID: <20051101054931.GA4399@us.ibm.com> (raw)
Hello!
Some fixes to RCU usage for sighand_struct, adding a couple of needed
rcu_assign_pointer() calls.
Signed-off-by: <paulmck@us.ibm.com>
---
diff -urpNa linux-2.6.14-rc5-rt5/fs/exec.c linux-2.6.14-rc5-rt5-sighandRCUfix/fs/exec.c
--- linux-2.6.14-rc5-rt5/fs/exec.c 2005-10-24 05:59:08.000000000 -0700
+++ linux-2.6.14-rc5-rt5-sighandRCUfix/fs/exec.c 2005-10-31 15:38:02.000000000 -0800
@@ -777,7 +777,7 @@ no_thread_group:
spin_lock(&oldsighand->siglock);
spin_lock(&newsighand->siglock);
- current->sighand = newsighand;
+ rcu_assign_pointer(current->sighand, newsighand);
recalc_sigpending();
spin_unlock(&newsighand->siglock);
diff -urpNa linux-2.6.14-rc5-rt5/kernel/fork.c linux-2.6.14-rc5-rt5-sighandRCUfix/kernel/fork.c
--- linux-2.6.14-rc5-rt5/kernel/fork.c 2005-10-24 05:59:08.000000000 -0700
+++ linux-2.6.14-rc5-rt5-sighandRCUfix/kernel/fork.c 2005-10-31 15:35:14.000000000 -0800
@@ -816,7 +816,7 @@ static inline int copy_sighand(unsigned
return 0;
}
sig = kmem_cache_alloc(sighand_cachep, GFP_KERNEL);
- tsk->sighand = sig;
+ rcu_assign_pointer(tsk->sighand, sig);
if (!sig)
return -ENOMEM;
spin_lock_init(&sig->siglock);
reply other threads:[~2005-11-01 5:49 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20051101054931.GA4399@us.ibm.com \
--to=paulmck@us.ibm.com \
--cc=akpm@osdl.org \
--cc=dipankar@in.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=oleg@tv-sign.ru \
--cc=suzannew@cs.pdx.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox