diff options
Diffstat (limited to 'net')
-rw-r--r-- | 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 07e28e089616..a3ff88dcc2ac 100644 --- a/net/netfilter/nf_log.c +++ b/net/netfilter/nf_log.c | |||
@@ -46,11 +46,11 @@ int nf_log_unregister_pf(int pf) | |||
46 | return -EINVAL; | 46 | return -EINVAL; |
47 | 47 | ||
48 | spin_lock(&nf_log_lock); | 48 | spin_lock(&nf_log_lock); |
49 | nf_logging[pf] = NULL; | 49 | rcu_assign_pointer(nf_logging[pf], NULL); |
50 | spin_unlock(&nf_log_lock); | 50 | spin_unlock(&nf_log_lock); |
51 | 51 | ||
52 | /* Give time to concurrent readers. */ | 52 | /* Give time to concurrent readers. */ |
53 | synchronize_net(); | 53 | synchronize_rcu(); |
54 | 54 | ||
55 | return 0; | 55 | return 0; |
56 | } | 56 | } |
@@ -63,11 +63,11 @@ void nf_log_unregister_logger(struct nf_logger *logger) | |||
63 | spin_lock(&nf_log_lock); | 63 | spin_lock(&nf_log_lock); |
64 | for (i = 0; i < NPROTO; i++) { | 64 | for (i = 0; i < NPROTO; i++) { |
65 | if (nf_logging[i] == logger) | 65 | if (nf_logging[i] == logger) |
66 | nf_logging[i] = NULL; | 66 | rcu_assign_pointer(nf_logging[i], NULL); |
67 | } | 67 | } |
68 | spin_unlock(&nf_log_lock); | 68 | spin_unlock(&nf_log_lock); |
69 | 69 | ||
70 | synchronize_net(); | 70 | synchronize_rcu(); |
71 | } | 71 | } |
72 | EXPORT_SYMBOL(nf_log_unregister_logger); | 72 | EXPORT_SYMBOL(nf_log_unregister_logger); |
73 | 73 | ||