diff options
-rw-r--r-- | net/dccp/ccids/ccid2.c | 14 | ||||
-rw-r--r-- | net/dccp/timer.c | 2 |
2 files changed, 13 insertions, 3 deletions
diff --git a/net/dccp/ccids/ccid2.c b/net/dccp/ccids/ccid2.c index 92d016e87816..385f153fe031 100644 --- a/net/dccp/ccids/ccid2.c +++ b/net/dccp/ccids/ccid2.c | |||
@@ -126,6 +126,16 @@ static void ccid2_change_l_seq_window(struct sock *sk, u64 val) | |||
126 | DCCPF_SEQ_WMAX)); | 126 | DCCPF_SEQ_WMAX)); |
127 | } | 127 | } |
128 | 128 | ||
129 | static void dccp_tasklet_schedule(struct sock *sk) | ||
130 | { | ||
131 | struct tasklet_struct *t = &dccp_sk(sk)->dccps_xmitlet; | ||
132 | |||
133 | if (!test_and_set_bit(TASKLET_STATE_SCHED, &t->state)) { | ||
134 | sock_hold(sk); | ||
135 | __tasklet_schedule(t); | ||
136 | } | ||
137 | } | ||
138 | |||
129 | static void ccid2_hc_tx_rto_expire(struct timer_list *t) | 139 | static void ccid2_hc_tx_rto_expire(struct timer_list *t) |
130 | { | 140 | { |
131 | struct ccid2_hc_tx_sock *hc = from_timer(hc, t, tx_rtotimer); | 141 | struct ccid2_hc_tx_sock *hc = from_timer(hc, t, tx_rtotimer); |
@@ -166,7 +176,7 @@ static void ccid2_hc_tx_rto_expire(struct timer_list *t) | |||
166 | 176 | ||
167 | /* if we were blocked before, we may now send cwnd=1 packet */ | 177 | /* if we were blocked before, we may now send cwnd=1 packet */ |
168 | if (sender_was_blocked) | 178 | if (sender_was_blocked) |
169 | tasklet_schedule(&dccp_sk(sk)->dccps_xmitlet); | 179 | dccp_tasklet_schedule(sk); |
170 | /* restart backed-off timer */ | 180 | /* restart backed-off timer */ |
171 | sk_reset_timer(sk, &hc->tx_rtotimer, jiffies + hc->tx_rto); | 181 | sk_reset_timer(sk, &hc->tx_rtotimer, jiffies + hc->tx_rto); |
172 | out: | 182 | out: |
@@ -706,7 +716,7 @@ static void ccid2_hc_tx_packet_recv(struct sock *sk, struct sk_buff *skb) | |||
706 | done: | 716 | done: |
707 | /* check if incoming Acks allow pending packets to be sent */ | 717 | /* check if incoming Acks allow pending packets to be sent */ |
708 | if (sender_was_blocked && !ccid2_cwnd_network_limited(hc)) | 718 | if (sender_was_blocked && !ccid2_cwnd_network_limited(hc)) |
709 | tasklet_schedule(&dccp_sk(sk)->dccps_xmitlet); | 719 | dccp_tasklet_schedule(sk); |
710 | dccp_ackvec_parsed_cleanup(&hc->tx_av_chunks); | 720 | dccp_ackvec_parsed_cleanup(&hc->tx_av_chunks); |
711 | } | 721 | } |
712 | 722 | ||
diff --git a/net/dccp/timer.c b/net/dccp/timer.c index b50a8732ff43..1501a20a94ca 100644 --- a/net/dccp/timer.c +++ b/net/dccp/timer.c | |||
@@ -232,6 +232,7 @@ static void dccp_write_xmitlet(unsigned long data) | |||
232 | else | 232 | else |
233 | dccp_write_xmit(sk); | 233 | dccp_write_xmit(sk); |
234 | bh_unlock_sock(sk); | 234 | bh_unlock_sock(sk); |
235 | sock_put(sk); | ||
235 | } | 236 | } |
236 | 237 | ||
237 | static void dccp_write_xmit_timer(struct timer_list *t) | 238 | static void dccp_write_xmit_timer(struct timer_list *t) |
@@ -240,7 +241,6 @@ static void dccp_write_xmit_timer(struct timer_list *t) | |||
240 | struct sock *sk = &dp->dccps_inet_connection.icsk_inet.sk; | 241 | struct sock *sk = &dp->dccps_inet_connection.icsk_inet.sk; |
241 | 242 | ||
242 | dccp_write_xmitlet((unsigned long)sk); | 243 | dccp_write_xmitlet((unsigned long)sk); |
243 | sock_put(sk); | ||
244 | } | 244 | } |
245 | 245 | ||
246 | void dccp_init_xmit_timers(struct sock *sk) | 246 | void dccp_init_xmit_timers(struct sock *sk) |