Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=a5ea6169f294bc33a762f7c1c240e3ac0f045f9e
Commit:     a5ea6169f294bc33a762f7c1c240e3ac0f045f9e
Parent:     fd706d6957b3c66ae70b4bbdb9e13993213697f7
Author:     Patrick McHardy <[EMAIL PROTECTED]>
AuthorDate: Mon Feb 12 11:11:06 2007 -0800
Committer:  David S. Miller <[EMAIL PROTECTED]>
CommitDate: Mon Feb 12 11:11:06 2007 -0800

    [NETFILTER]: nf_log: use rcu_assign_pointer for RCU protected pointer
    
    Also replace synchronize_net() calls by synchronize_rcu() since the
    RCU protected data is also used for sysfs.
    
    Signed-off-by: Patrick McHardy <[EMAIL PROTECTED]>
    Signed-off-by: David S. Miller <[EMAIL PROTECTED]>
---
 net/netfilter/nf_log.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/net/netfilter/nf_log.c b/net/netfilter/nf_log.c
index 07e28e0..a3ff88d 100644
--- a/net/netfilter/nf_log.c
+++ b/net/netfilter/nf_log.c
@@ -46,11 +46,11 @@ int nf_log_unregister_pf(int pf)
                return -EINVAL;
 
        spin_lock(&nf_log_lock);
-       nf_logging[pf] = NULL;
+       rcu_assign_pointer(nf_logging[pf], NULL);
        spin_unlock(&nf_log_lock);
 
        /* Give time to concurrent readers. */
-       synchronize_net();
+       synchronize_rcu();
 
        return 0;
 }
@@ -63,11 +63,11 @@ void nf_log_unregister_logger(struct nf_logger *logger)
        spin_lock(&nf_log_lock);
        for (i = 0; i < NPROTO; i++) {
                if (nf_logging[i] == logger)
-                       nf_logging[i] = NULL;
+                       rcu_assign_pointer(nf_logging[i], NULL);
        }
        spin_unlock(&nf_log_lock);
 
-       synchronize_net();
+       synchronize_rcu();
 }
 EXPORT_SYMBOL(nf_log_unregister_logger);
 
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to