diff options
Diffstat (limited to 'net')
-rw-r--r-- | net/netfilter/nfnetlink_log.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/net/netfilter/nfnetlink_log.c b/net/netfilter/nfnetlink_log.c index d0af8bc3eee1..91a0972ec117 100644 --- a/net/netfilter/nfnetlink_log.c +++ b/net/netfilter/nfnetlink_log.c | |||
@@ -218,6 +218,9 @@ _instance_destroy2(struct nfulnl_instance *inst, int lock) | |||
218 | 218 | ||
219 | spin_lock_bh(&inst->lock); | 219 | spin_lock_bh(&inst->lock); |
220 | if (inst->skb) { | 220 | if (inst->skb) { |
221 | /* timer "holds" one reference (we have one more) */ | ||
222 | if (del_timer(&inst->timer)) | ||
223 | instance_put(inst); | ||
221 | if (inst->qlen) | 224 | if (inst->qlen) |
222 | __nfulnl_send(inst); | 225 | __nfulnl_send(inst); |
223 | if (inst->skb) { | 226 | if (inst->skb) { |
@@ -362,9 +365,6 @@ __nfulnl_send(struct nfulnl_instance *inst) | |||
362 | { | 365 | { |
363 | int status; | 366 | int status; |
364 | 367 | ||
365 | if (timer_pending(&inst->timer)) | ||
366 | del_timer(&inst->timer); | ||
367 | |||
368 | if (!inst->skb) | 368 | if (!inst->skb) |
369 | return 0; | 369 | return 0; |
370 | 370 | ||
@@ -689,6 +689,9 @@ nfulnl_log_packet(unsigned int pf, | |||
689 | * enough room in the skb left. flush to userspace. */ | 689 | * enough room in the skb left. flush to userspace. */ |
690 | UDEBUG("flushing old skb\n"); | 690 | UDEBUG("flushing old skb\n"); |
691 | 691 | ||
692 | /* timer "holds" one reference (we have another one) */ | ||
693 | if (del_timer(&inst->timer)) | ||
694 | instance_put(inst); | ||
692 | __nfulnl_send(inst); | 695 | __nfulnl_send(inst); |
693 | 696 | ||
694 | if (!(inst->skb = nfulnl_alloc_skb(nlbufsiz, size))) { | 697 | if (!(inst->skb = nfulnl_alloc_skb(nlbufsiz, size))) { |