diff --git a/net/netfilter/nfnetlink_log.c b/net/netfilter/nfnetlink_log.c index 8a460b1..1d45ff6 100644 --- a/net/netfilter/nfnetlink_log.c +++ b/net/netfilter/nfnetlink_log.c @@ -213,6 +213,9 @@ _instance_destroy2(struct nfulnl_instanc if (lock) write_unlock_bh(&instances_lock); + sychronize_rcu(); + if (del_timer_sync(&inst->timer)) + instance_put(inst); /* then flush all pending packets from skb */ spin_lock_bh(&inst->lock); @@ -363,9 +366,6 @@ __nfulnl_send(struct nfulnl_instance *in { int status; - if (timer_pending(&inst->timer)) - del_timer(&inst->timer); - if (!inst->skb) return 0; @@ -676,6 +676,9 @@ #endif * enough room in the skb left. flush to userspace. */ UDEBUG("flushing old skb\n"); + if (del_timer(&inst->timer)) + instance_put(inst); + __nfulnl_send(inst); }