From: Michal Miroslaw Date: Sun, 4 Mar 2007 23:58:40 +0000 (-0800) Subject: [NETFILTER]: nfnetlink_log: fix use after free X-Git-Tag: v2.6.21-rc3~2^2~12 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=05f7b7b369e039458a77768619dde123d868c78d;p=linux-2.6-omap-h63xx.git [NETFILTER]: nfnetlink_log: fix use after free Paranoia: instance_put() might have freed the inst pointer when we spin_unlock_bh(). Signed-off-by: Michal Miroslaw Signed-off-by: Patrick McHardy Signed-off-by: David S. Miller --- diff --git a/net/netfilter/nfnetlink_log.c b/net/netfilter/nfnetlink_log.c index 62c3f31cdb9..27b844a67ec 100644 --- a/net/netfilter/nfnetlink_log.c +++ b/net/netfilter/nfnetlink_log.c @@ -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