aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorGerrit Renker <gerrit@erg.abdn.ac.uk>2012-02-27 14:29:44 -0500
committerGerrit Renker <gerrit@erg.abdn.ac.uk>2012-03-03 11:02:36 -0500
commit793734b587a670e47a8d65f9e5211ba2188bb904 (patch)
treefb60d9fb18d4190170bc3018dc503fbbea3b7b23 /net
parentb4017c5368f992fb8fb3a2545a0977082c6664e4 (diff)
dccp ccid-3: replace incorrect BUG_ON
This replaces an unjustified BUG_ON(), which could get triggered under normal conditions: X_calc can be 0 when p > 0. X would in this case be set to the minimum, s/t_mbi. Its replacement avoids t_ipi = 0 (unbounded sending rate). Thanks to Jordi, Victor and Xavier who reported this. Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk> Acked-by: Ian McDonald <ian.mcdonald@jandi.co.uk>
Diffstat (limited to 'net')
-rw-r--r--net/dccp/ccids/ccid3.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/net/dccp/ccids/ccid3.c b/net/dccp/ccids/ccid3.c
index 560627307200..70bfaf2d1965 100644
--- a/net/dccp/ccids/ccid3.c
+++ b/net/dccp/ccids/ccid3.c
@@ -98,6 +98,7 @@ static void ccid3_update_send_interval(struct ccid3_hc_tx_sock *hc)
98{ 98{
99 hc->tx_t_ipi = scaled_div32(((u64)hc->tx_s) << 6, hc->tx_x); 99 hc->tx_t_ipi = scaled_div32(((u64)hc->tx_s) << 6, hc->tx_x);
100 100
101 DCCP_BUG_ON(hc->tx_t_ipi == 0);
101 ccid3_pr_debug("t_ipi=%u, s=%u, X=%u\n", hc->tx_t_ipi, 102 ccid3_pr_debug("t_ipi=%u, s=%u, X=%u\n", hc->tx_t_ipi,
102 hc->tx_s, (unsigned)(hc->tx_x >> 6)); 103 hc->tx_s, (unsigned)(hc->tx_x >> 6));
103} 104}
@@ -236,8 +237,6 @@ static void ccid3_hc_tx_no_feedback_timer(unsigned long data)
236 * 237 *
237 * Note that X_recv is scaled by 2^6 while X_calc is not 238 * Note that X_recv is scaled by 2^6 while X_calc is not
238 */ 239 */
239 BUG_ON(hc->tx_p && !hc->tx_x_calc);
240
241 if (hc->tx_x_calc > (hc->tx_x_recv >> 5)) 240 if (hc->tx_x_calc > (hc->tx_x_recv >> 5))
242 hc->tx_x_recv = 241 hc->tx_x_recv =
243 max(hc->tx_x_recv / 2, 242 max(hc->tx_x_recv / 2,