File tree Expand file tree Collapse file tree 2 files changed +13
-3
lines changed Expand file tree Collapse file tree 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)
126126 DCCPF_SEQ_WMAX ));
127127}
128128
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+
129139static void ccid2_hc_tx_rto_expire (struct timer_list * t )
130140{
131141 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)
166176
167177 /* if we were blocked before, we may now send cwnd=1 packet */
168178 if (sender_was_blocked )
169- tasklet_schedule ( & dccp_sk ( sk ) -> dccps_xmitlet );
179+ dccp_tasklet_schedule ( sk );
170180 /* restart backed-off timer */
171181 sk_reset_timer (sk , & hc -> tx_rtotimer , jiffies + hc -> tx_rto );
172182out :
@@ -706,7 +716,7 @@ static void ccid2_hc_tx_packet_recv(struct sock *sk, struct sk_buff *skb)
706716done :
707717 /* check if incoming Acks allow pending packets to be sent */
708718 if (sender_was_blocked && !ccid2_cwnd_network_limited (hc ))
709- tasklet_schedule ( & dccp_sk ( sk ) -> dccps_xmitlet );
719+ dccp_tasklet_schedule ( sk );
710720 dccp_ackvec_parsed_cleanup (& hc -> tx_av_chunks );
711721}
712722
Original file line number Diff line number Diff line change @@ -232,6 +232,7 @@ static void dccp_write_xmitlet(unsigned long data)
232232 else
233233 dccp_write_xmit (sk );
234234 bh_unlock_sock (sk );
235+ sock_put (sk );
235236}
236237
237238static void dccp_write_xmit_timer (struct timer_list * t )
@@ -240,7 +241,6 @@ static void dccp_write_xmit_timer(struct timer_list *t)
240241 struct sock * sk = & dp -> dccps_inet_connection .icsk_inet .sk ;
241242
242243 dccp_write_xmitlet ((unsigned long )sk );
243- sock_put (sk );
244244}
245245
246246void dccp_init_xmit_timers (struct sock * sk )
You can’t perform that action at this time.
0 commit comments