-#include <linux/config.h>
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/module.h>
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;
}
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);
return seq_open(file, &nflog_seq_ops);
}
-static struct file_operations nflog_file_ops = {
+static const struct file_operations nflog_file_ops = {
.owner = THIS_MODULE,
.open = nflog_open,
.read = seq_read,