[XFRM]: xfrm_state_lookup() annotations
[pandora-kernel.git] / net / ipv4 / inet_timewait_sock.c
index f9076ef..cdd8053 100644 (file)
@@ -8,7 +8,6 @@
  *             From code orinally in TCP
  */
 
-#include <linux/config.h>
 
 #include <net/inet_hashtables.h>
 #include <net/inet_timewait_sock.h>
@@ -90,8 +89,9 @@ EXPORT_SYMBOL_GPL(__inet_twsk_hashdance);
 
 struct inet_timewait_sock *inet_twsk_alloc(const struct sock *sk, const int state)
 {
-       struct inet_timewait_sock *tw = kmem_cache_alloc(sk->sk_prot_creator->twsk_slab,
-                                                        SLAB_ATOMIC);
+       struct inet_timewait_sock *tw =
+               kmem_cache_alloc(sk->sk_prot_creator->twsk_prot->twsk_slab,
+                                SLAB_ATOMIC);
        if (tw != NULL) {
                const struct inet_sock *inet = inet_sk(sk);
 
@@ -111,6 +111,7 @@ struct inet_timewait_sock *inet_twsk_alloc(const struct sock *sk, const int stat
                tw->tw_prot         = sk->sk_prot_creator;
                atomic_set(&tw->tw_refcnt, 1);
                inet_twsk_dead_node_init(tw);
+               __module_get(tw->tw_prot->owner);
        }
 
        return tw;