File tree 2 files changed +13
-3
lines changed 2 files changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -126,6 +126,16 @@ static void ccid2_change_l_seq_window(struct sock *sk, u64 val)
126
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
139
static void ccid2_hc_tx_rto_expire (struct timer_list * t )
130
140
{
131
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
177
/* if we were blocked before, we may now send cwnd=1 packet */
168
178
if (sender_was_blocked )
169
- tasklet_schedule ( & dccp_sk ( sk ) -> dccps_xmitlet );
179
+ dccp_tasklet_schedule ( sk );
170
180
/* restart backed-off timer */
171
181
sk_reset_timer (sk , & hc -> tx_rtotimer , jiffies + hc -> tx_rto );
172
182
out :
@@ -706,7 +716,7 @@ static void ccid2_hc_tx_packet_recv(struct sock *sk, struct sk_buff *skb)
706
716
done :
707
717
/* check if incoming Acks allow pending packets to be sent */
708
718
if (sender_was_blocked && !ccid2_cwnd_network_limited (hc ))
709
- tasklet_schedule ( & dccp_sk ( sk ) -> dccps_xmitlet );
719
+ dccp_tasklet_schedule ( sk );
710
720
dccp_ackvec_parsed_cleanup (& hc -> tx_av_chunks );
711
721
}
712
722
Original file line number Diff line number Diff line change @@ -232,6 +232,7 @@ static void dccp_write_xmitlet(unsigned long data)
232
232
else
233
233
dccp_write_xmit (sk );
234
234
bh_unlock_sock (sk );
235
+ sock_put (sk );
235
236
}
236
237
237
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
241
struct sock * sk = & dp -> dccps_inet_connection .icsk_inet .sk ;
241
242
242
243
dccp_write_xmitlet ((unsigned long )sk );
243
- sock_put (sk );
244
244
}
245
245
246
246
void dccp_init_xmit_timers (struct sock * sk )
You can’t perform that action at this time.
0 commit comments