* [PATCH] Fixes for RCU handling of sighand_struct
@ 2005-11-01 5:49 Paul E. McKenney
0 siblings, 0 replies; only message in thread
From: Paul E. McKenney @ 2005-11-01 5:49 UTC (permalink / raw)
To: mingo; +Cc: linux-kernel, oleg, dipankar, suzannew, akpm
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);
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2005-11-01 5:49 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-11-01 5:49 [PATCH] Fixes for RCU handling of sighand_struct Paul E. McKenney
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.