Re: [PATCH v4 11/18] nfnetlink_log: exit_net cleanup check added

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello!

On 11/12/2017 11:46 AM, Vasily Averin wrote:

Be sure that instance_table array initialized in net_init hook
was return to initial state.

Signed-off-by: Vasily Averin <vvs@xxxxxxxxxxxxx>
---
  net/netfilter/nfnetlink_log.c | 5 +++++
  1 file changed, 5 insertions(+)

diff --git a/net/netfilter/nfnetlink_log.c b/net/netfilter/nfnetlink_log.c
index cad6498..80236a2 100644
--- a/net/netfilter/nfnetlink_log.c
+++ b/net/netfilter/nfnetlink_log.c
@@ -1093,10 +1093,15 @@ static int __net_init nfnl_log_net_init(struct net *net)
static void __net_exit nfnl_log_net_exit(struct net *net)
  {
+	unsigned int i;
+	struct nfnl_log_net *log = nfnl_log_pernet(net);

   Need empty line after the declarations.

  #ifdef CONFIG_PROC_FS
  	remove_proc_entry("nfnetlink_log", net->nf.proc_netfilter);
  #endif
  	nf_log_unset(net, &nfulnl_logger);
+	for (i = 0; i < INSTANCE_BUCKETS; i++)
+		if (WARN_ON_ONCE(!hlist_empty(&log->instance_table[i])))
+			break;
  }
[...]

MBR, Sergei
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux