]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[NETFILTER]: nfnetlink_log: fix use after free
authorMichal Miroslaw <mirq-linux@rere.qmqm.pl>
Sun, 4 Mar 2007 23:58:40 +0000 (15:58 -0800)
committerDavid S. Miller <davem@sunset.davemloft.net>
Mon, 5 Mar 2007 21:25:22 +0000 (13:25 -0800)
Paranoia: instance_put() might have freed the inst pointer when we
spin_unlock_bh().

Signed-off-by: Michal Miroslaw <mirq-linux@rere.qmqm.pl>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/netfilter/nfnetlink_log.c

index 62c3f31cdb97befb4bf9a3deef8591d2ca36aa89..27b844a67ec1c2fe4c2c0d3ecaa93b28d4e0da0c 100644 (file)
@@ -393,8 +393,8 @@ static void nfulnl_timer(unsigned long data)
 
        spin_lock_bh(&inst->lock);
        __nfulnl_send(inst);
-       instance_put(inst);
        spin_unlock_bh(&inst->lock);
+       instance_put(inst);
 }
 
 /* This is an inline function, we don't really care about a long