Skip to content

Commit

Permalink
netfilter: nf_log: wait for rcu grace after logger unregistration
Browse files Browse the repository at this point in the history
The nf_log_unregister() function needs to call synchronize_rcu() to make sure
that the objects are not dereferenced anymore on module removal.

Fixes: 5962815 ("netfilter: nf_log: use an array of loggers instead of list")
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
  • Loading branch information
Pablo Neira Ayuso committed Sep 17, 2015
1 parent ba378ca commit ad5001c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions net/netfilter/nf_log.c
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ void nf_log_unregister(struct nf_logger *logger)
RCU_INIT_POINTER(loggers[i][logger->type], NULL);
}
mutex_unlock(&nf_log_mutex);
synchronize_rcu();
}
EXPORT_SYMBOL(nf_log_unregister);

Expand Down

0 comments on commit ad5001c

Please sign in to comment.