Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=7d90e86d31e8beeb66d6754aece890ac4a579887
Commit:     7d90e86d31e8beeb66d6754aece890ac4a579887
Parent:     dd16704eba171b32ef0cded3a4f562b33b911066
Author:     Patrick McHardy <[EMAIL PROTECTED]>
AuthorDate: Sun Mar 4 15:59:45 2007 -0800
Committer:  David S. Miller <[EMAIL PROTECTED]>
CommitDate: Mon Mar 5 13:25:25 2007 -0800

    [NETFILTER]: nfnetlink_log: fix module reference counting
    
    Count module references correctly: after instance_destroy() there
    might be timer pending and holding a reference for this netlink instance.
    
    Based on patch by Michal Miroslaw <[EMAIL PROTECTED]>
    
    Signed-off-by: Patrick McHardy <[EMAIL PROTECTED]>
    Signed-off-by: David S. Miller <[EMAIL PROTECTED]>
---
 net/netfilter/nfnetlink_log.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/net/netfilter/nfnetlink_log.c b/net/netfilter/nfnetlink_log.c
index b669db5..d0af8bc 100644
--- a/net/netfilter/nfnetlink_log.c
+++ b/net/netfilter/nfnetlink_log.c
@@ -133,6 +133,7 @@ instance_put(struct nfulnl_instance *inst)
        if (inst && atomic_dec_and_test(&inst->use)) {
                UDEBUG("kfree(inst=%p)\n", inst);
                kfree(inst);
+               module_put(THIS_MODULE);
        }
 }
 
@@ -228,8 +229,6 @@ _instance_destroy2(struct nfulnl_instance *inst, int lock)
 
        /* and finally put the refcount */
        instance_put(inst);
-
-       module_put(THIS_MODULE);
 }
 
 static inline void
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to