]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - fs/exec.c
[PATCH] RCU signal handling
[karo-tx-linux.git] / fs / exec.c
index e75a9548da8ef397b4cec6e1527f00d81e6fd5c4..e9650cd22a3b9f086d53fa921ae7dc210063fecc 100644 (file)
--- a/fs/exec.c
+++ b/fs/exec.c
@@ -760,7 +760,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);
@@ -768,7 +768,7 @@ no_thread_group:
                write_unlock_irq(&tasklist_lock);
 
                if (atomic_dec_and_test(&oldsighand->count))
-                       kmem_cache_free(sighand_cachep, oldsighand);
+                       sighand_free(oldsighand);
        }
 
        BUG_ON(!thread_group_leader(current));