aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
Diffstat (limited to 'net')
-rw-r--r--net/bluetooth/rfcomm/core.c4
-rw-r--r--net/bridge/netfilter/ebt_ulog.c6
-rw-r--r--net/core/sock.c2
-rw-r--r--net/ipv4/netfilter/ipt_ULOG.c12
-rw-r--r--net/irda/af_irda.c3
-rw-r--r--net/netfilter/ipvs/ip_vs_conn.c3
-rw-r--r--net/sctp/associola.c5
-rw-r--r--net/sctp/input.c3
-rw-r--r--net/sctp/outqueue.c4
-rw-r--r--net/sctp/sm_sideeffect.c6
-rw-r--r--net/sctp/transport.c11
11 files changed, 21 insertions, 38 deletions
diff --git a/net/bluetooth/rfcomm/core.c b/net/bluetooth/rfcomm/core.c
index 201fdf737209..b23e2713fea8 100644
--- a/net/bluetooth/rfcomm/core.c
+++ b/net/bluetooth/rfcomm/core.c
@@ -257,7 +257,7 @@ static void rfcomm_session_clear_timer(struct rfcomm_session *s)
257{ 257{
258 BT_DBG("session %p state %ld", s, s->state); 258 BT_DBG("session %p state %ld", s, s->state);
259 259
260 if (timer_pending(&s->timer) && del_timer(&s->timer)) 260 if (del_timer(&s->timer))
261 rfcomm_session_put(s); 261 rfcomm_session_put(s);
262} 262}
263 263
@@ -285,7 +285,7 @@ static void rfcomm_dlc_clear_timer(struct rfcomm_dlc *d)
285{ 285{
286 BT_DBG("dlc %p state %ld", d, d->state); 286 BT_DBG("dlc %p state %ld", d, d->state);
287 287
288 if (timer_pending(&d->timer) && del_timer(&d->timer)) 288 if (del_timer(&d->timer))
289 rfcomm_dlc_put(d); 289 rfcomm_dlc_put(d);
290} 290}
291 291
diff --git a/net/bridge/netfilter/ebt_ulog.c b/net/bridge/netfilter/ebt_ulog.c
index 3476ec469740..3bf43f7bb9d4 100644
--- a/net/bridge/netfilter/ebt_ulog.c
+++ b/net/bridge/netfilter/ebt_ulog.c
@@ -70,8 +70,7 @@ static void ulog_send(unsigned int nlgroup)
70{ 70{
71 ebt_ulog_buff_t *ub = &ulog_buffers[nlgroup]; 71 ebt_ulog_buff_t *ub = &ulog_buffers[nlgroup];
72 72
73 if (timer_pending(&ub->timer)) 73 del_timer(&ub->timer);
74 del_timer(&ub->timer);
75 74
76 if (!ub->skb) 75 if (!ub->skb)
77 return; 76 return;
@@ -319,8 +318,7 @@ static void __exit ebt_ulog_fini(void)
319 xt_unregister_target(&ebt_ulog_tg_reg); 318 xt_unregister_target(&ebt_ulog_tg_reg);
320 for (i = 0; i < EBT_ULOG_MAXNLGROUPS; i++) { 319 for (i = 0; i < EBT_ULOG_MAXNLGROUPS; i++) {
321 ub = &ulog_buffers[i]; 320 ub = &ulog_buffers[i];
322 if (timer_pending(&ub->timer)) 321 del_timer(&ub->timer);
323 del_timer(&ub->timer);
324 spin_lock_bh(&ub->lock); 322 spin_lock_bh(&ub->lock);
325 if (ub->skb) { 323 if (ub->skb) {
326 kfree_skb(ub->skb); 324 kfree_skb(ub->skb);
diff --git a/net/core/sock.c b/net/core/sock.c
index 235fb89e8973..f1e14e20d181 100644
--- a/net/core/sock.c
+++ b/net/core/sock.c
@@ -2230,7 +2230,7 @@ EXPORT_SYMBOL(sk_reset_timer);
2230 2230
2231void sk_stop_timer(struct sock *sk, struct timer_list* timer) 2231void sk_stop_timer(struct sock *sk, struct timer_list* timer)
2232{ 2232{
2233 if (timer_pending(timer) && del_timer(timer)) 2233 if (del_timer(timer))
2234 __sock_put(sk); 2234 __sock_put(sk);
2235} 2235}
2236EXPORT_SYMBOL(sk_stop_timer); 2236EXPORT_SYMBOL(sk_stop_timer);
diff --git a/net/ipv4/netfilter/ipt_ULOG.c b/net/ipv4/netfilter/ipt_ULOG.c
index b5ef3cba2250..7d168dcbd135 100644
--- a/net/ipv4/netfilter/ipt_ULOG.c
+++ b/net/ipv4/netfilter/ipt_ULOG.c
@@ -88,10 +88,8 @@ static void ulog_send(unsigned int nlgroupnum)
88{ 88{
89 ulog_buff_t *ub = &ulog_buffers[nlgroupnum]; 89 ulog_buff_t *ub = &ulog_buffers[nlgroupnum];
90 90
91 if (timer_pending(&ub->timer)) { 91 pr_debug("ulog_send: timer is deleting\n");
92 pr_debug("ulog_send: timer was pending, deleting\n"); 92 del_timer(&ub->timer);
93 del_timer(&ub->timer);
94 }
95 93
96 if (!ub->skb) { 94 if (!ub->skb) {
97 pr_debug("ulog_send: nothing to send\n"); 95 pr_debug("ulog_send: nothing to send\n");
@@ -426,10 +424,8 @@ static void __exit ulog_tg_exit(void)
426 /* remove pending timers and free allocated skb's */ 424 /* remove pending timers and free allocated skb's */
427 for (i = 0; i < ULOG_MAXNLGROUPS; i++) { 425 for (i = 0; i < ULOG_MAXNLGROUPS; i++) {
428 ub = &ulog_buffers[i]; 426 ub = &ulog_buffers[i];
429 if (timer_pending(&ub->timer)) { 427 pr_debug("timer is deleting\n");
430 pr_debug("timer was pending, deleting\n"); 428 del_timer(&ub->timer);
431 del_timer(&ub->timer);
432 }
433 429
434 if (ub->skb) { 430 if (ub->skb) {
435 kfree_skb(ub->skb); 431 kfree_skb(ub->skb);
diff --git a/net/irda/af_irda.c b/net/irda/af_irda.c
index b833677d83d6..d07e3a626446 100644
--- a/net/irda/af_irda.c
+++ b/net/irda/af_irda.c
@@ -2567,8 +2567,7 @@ bed:
2567 err); 2567 err);
2568 2568
2569 /* If watchdog is still activated, kill it! */ 2569 /* If watchdog is still activated, kill it! */
2570 if(timer_pending(&(self->watchdog))) 2570 del_timer(&(self->watchdog));
2571 del_timer(&(self->watchdog));
2572 2571
2573 IRDA_DEBUG(1, "%s(), ...waking up !\n", __func__); 2572 IRDA_DEBUG(1, "%s(), ...waking up !\n", __func__);
2574 2573
diff --git a/net/netfilter/ipvs/ip_vs_conn.c b/net/netfilter/ipvs/ip_vs_conn.c
index 30e764ad021f..68e368a4beed 100644
--- a/net/netfilter/ipvs/ip_vs_conn.c
+++ b/net/netfilter/ipvs/ip_vs_conn.c
@@ -796,8 +796,7 @@ static void ip_vs_conn_expire(unsigned long data)
796 */ 796 */
797 if (likely(atomic_read(&cp->refcnt) == 1)) { 797 if (likely(atomic_read(&cp->refcnt) == 1)) {
798 /* delete the timer if it is activated by other users */ 798 /* delete the timer if it is activated by other users */
799 if (timer_pending(&cp->timer)) 799 del_timer(&cp->timer);
800 del_timer(&cp->timer);
801 800
802 /* does anybody control me? */ 801 /* does anybody control me? */
803 if (cp->control) 802 if (cp->control)
diff --git a/net/sctp/associola.c b/net/sctp/associola.c
index b45ed1f96921..2f95f5a5145d 100644
--- a/net/sctp/associola.c
+++ b/net/sctp/associola.c
@@ -434,8 +434,7 @@ void sctp_association_free(struct sctp_association *asoc)
434 * on our state. 434 * on our state.
435 */ 435 */
436 for (i = SCTP_EVENT_TIMEOUT_NONE; i < SCTP_NUM_TIMEOUT_TYPES; ++i) { 436 for (i = SCTP_EVENT_TIMEOUT_NONE; i < SCTP_NUM_TIMEOUT_TYPES; ++i) {
437 if (timer_pending(&asoc->timers[i]) && 437 if (del_timer(&asoc->timers[i]))
438 del_timer(&asoc->timers[i]))
439 sctp_association_put(asoc); 438 sctp_association_put(asoc);
440 } 439 }
441 440
@@ -1497,7 +1496,7 @@ void sctp_assoc_rwnd_increase(struct sctp_association *asoc, unsigned int len)
1497 1496
1498 /* Stop the SACK timer. */ 1497 /* Stop the SACK timer. */
1499 timer = &asoc->timers[SCTP_EVENT_TIMEOUT_SACK]; 1498 timer = &asoc->timers[SCTP_EVENT_TIMEOUT_SACK];
1500 if (timer_pending(timer) && del_timer(timer)) 1499 if (del_timer(timer))
1501 sctp_association_put(asoc); 1500 sctp_association_put(asoc);
1502 } 1501 }
1503} 1502}
diff --git a/net/sctp/input.c b/net/sctp/input.c
index 8bd3c279427e..965bbbbe48d4 100644
--- a/net/sctp/input.c
+++ b/net/sctp/input.c
@@ -468,8 +468,7 @@ void sctp_icmp_proto_unreachable(struct sock *sk,
468 } else { 468 } else {
469 struct net *net = sock_net(sk); 469 struct net *net = sock_net(sk);
470 470
471 if (timer_pending(&t->proto_unreach_timer) && 471 if (del_timer(&t->proto_unreach_timer))
472 del_timer(&t->proto_unreach_timer))
473 sctp_association_put(asoc); 472 sctp_association_put(asoc);
474 473
475 sctp_do_sm(net, SCTP_EVENT_T_OTHER, 474 sctp_do_sm(net, SCTP_EVENT_T_OTHER,
diff --git a/net/sctp/outqueue.c b/net/sctp/outqueue.c
index 9bcdbd02d777..01dca753db16 100644
--- a/net/sctp/outqueue.c
+++ b/net/sctp/outqueue.c
@@ -1700,10 +1700,8 @@ static void sctp_check_transmitted(struct sctp_outq *q,
1700 * address. 1700 * address.
1701 */ 1701 */
1702 if (!transport->flight_size) { 1702 if (!transport->flight_size) {
1703 if (timer_pending(&transport->T3_rtx_timer) && 1703 if (del_timer(&transport->T3_rtx_timer))
1704 del_timer(&transport->T3_rtx_timer)) {
1705 sctp_transport_put(transport); 1704 sctp_transport_put(transport);
1706 }
1707 } else if (restart_timer) { 1705 } else if (restart_timer) {
1708 if (!mod_timer(&transport->T3_rtx_timer, 1706 if (!mod_timer(&transport->T3_rtx_timer,
1709 jiffies + transport->rto)) 1707 jiffies + transport->rto))
diff --git a/net/sctp/sm_sideeffect.c b/net/sctp/sm_sideeffect.c
index c9577754a708..8aab894aeabe 100644
--- a/net/sctp/sm_sideeffect.c
+++ b/net/sctp/sm_sideeffect.c
@@ -674,10 +674,8 @@ static void sctp_cmd_t3_rtx_timers_stop(sctp_cmd_seq_t *cmds,
674 674
675 list_for_each_entry(t, &asoc->peer.transport_addr_list, 675 list_for_each_entry(t, &asoc->peer.transport_addr_list,
676 transports) { 676 transports) {
677 if (timer_pending(&t->T3_rtx_timer) && 677 if (del_timer(&t->T3_rtx_timer))
678 del_timer(&t->T3_rtx_timer)) {
679 sctp_transport_put(t); 678 sctp_transport_put(t);
680 }
681 } 679 }
682} 680}
683 681
@@ -1517,7 +1515,7 @@ static int sctp_cmd_interpreter(sctp_event_t event_type,
1517 1515
1518 case SCTP_CMD_TIMER_STOP: 1516 case SCTP_CMD_TIMER_STOP:
1519 timer = &asoc->timers[cmd->obj.to]; 1517 timer = &asoc->timers[cmd->obj.to];
1520 if (timer_pending(timer) && del_timer(timer)) 1518 if (del_timer(timer))
1521 sctp_association_put(asoc); 1519 sctp_association_put(asoc);
1522 break; 1520 break;
1523 1521
diff --git a/net/sctp/transport.c b/net/sctp/transport.c
index ca5331cc1ed2..fafd2a461ba0 100644
--- a/net/sctp/transport.c
+++ b/net/sctp/transport.c
@@ -151,13 +151,11 @@ void sctp_transport_free(struct sctp_transport *transport)
151 * structure hang around in memory since we know 151 * structure hang around in memory since we know
152 * the tranport is going away. 152 * the tranport is going away.
153 */ 153 */
154 if (timer_pending(&transport->T3_rtx_timer) && 154 if (del_timer(&transport->T3_rtx_timer))
155 del_timer(&transport->T3_rtx_timer))
156 sctp_transport_put(transport); 155 sctp_transport_put(transport);
157 156
158 /* Delete the ICMP proto unreachable timer if it's active. */ 157 /* Delete the ICMP proto unreachable timer if it's active. */
159 if (timer_pending(&transport->proto_unreach_timer) && 158 if (del_timer(&transport->proto_unreach_timer))
160 del_timer(&transport->proto_unreach_timer))
161 sctp_association_put(transport->asoc); 159 sctp_association_put(transport->asoc);
162 160
163 sctp_transport_put(transport); 161 sctp_transport_put(transport);
@@ -655,10 +653,9 @@ void sctp_transport_reset(struct sctp_transport *t)
655void sctp_transport_immediate_rtx(struct sctp_transport *t) 653void sctp_transport_immediate_rtx(struct sctp_transport *t)
656{ 654{
657 /* Stop pending T3_rtx_timer */ 655 /* Stop pending T3_rtx_timer */
658 if (timer_pending(&t->T3_rtx_timer)) { 656 if (del_timer(&t->T3_rtx_timer))
659 (void)del_timer(&t->T3_rtx_timer);
660 sctp_transport_put(t); 657 sctp_transport_put(t);
661 } 658
662 sctp_retransmit(&t->asoc->outqueue, t, SCTP_RTXR_T3_RTX); 659 sctp_retransmit(&t->asoc->outqueue, t, SCTP_RTXR_T3_RTX);
663 if (!timer_pending(&t->T3_rtx_timer)) { 660 if (!timer_pending(&t->T3_rtx_timer)) {
664 if (!mod_timer(&t->T3_rtx_timer, jiffies + t->rto)) 661 if (!mod_timer(&t->T3_rtx_timer, jiffies + t->rto))