timers, net/ipv4/inet: Initialize connection request timers as pinned
[deliverable/linux.git] / net / ipv4 / inet_timewait_sock.c
index 2065816748066986f0356df168c2d76fe2d53d85..ddcd56c08d14d37cec17719bb36be234a28dc35e 100644 (file)
@@ -188,7 +188,8 @@ struct inet_timewait_sock *inet_twsk_alloc(const struct sock *sk,
                tw->tw_prot         = sk->sk_prot_creator;
                atomic64_set(&tw->tw_cookie, atomic64_read(&sk->sk_cookie));
                twsk_net_set(tw, sock_net(sk));
-               setup_timer(&tw->tw_timer, tw_timer_handler, (unsigned long)tw);
+               setup_pinned_timer(&tw->tw_timer, tw_timer_handler,
+                                  (unsigned long)tw);
                /*
                 * Because we use RCU lookups, we should not set tw_refcnt
                 * to a non null value before everything is setup for this
@@ -248,7 +249,7 @@ void __inet_twsk_schedule(struct inet_timewait_sock *tw, int timeo, bool rearm)
 
        tw->tw_kill = timeo <= 4*HZ;
        if (!rearm) {
-               BUG_ON(mod_timer_pinned(&tw->tw_timer, jiffies + timeo));
+               BUG_ON(mod_timer(&tw->tw_timer, jiffies + timeo));
                atomic_inc(&tw->tw_dr->tw_count);
        } else {
                mod_timer_pending(&tw->tw_timer, jiffies + timeo);
This page took 0.039708 seconds and 5 git commands to generate.