Skip to content

Commit fa4eb69

Browse files
committed
tgupdate: merge t/DO-NOT-MERGE-mptcp-enabled-by-default base into t/DO-NOT-MERGE-mptcp-enabled-by-default
2 parents bf4e404 + 7316672 commit fa4eb69

File tree

3 files changed

+14
-12
lines changed

3 files changed

+14
-12
lines changed

drivers/net/ethernet/ti/am65-cpsw-nuss.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2282,7 +2282,7 @@ static void am65_cpsw_nuss_remove_tx_chns(struct am65_cpsw_common *common)
22822282
for (i = 0; i < common->tx_ch_num; i++) {
22832283
struct am65_cpsw_tx_chn *tx_chn = &common->tx_chns[i];
22842284

2285-
if (tx_chn->irq)
2285+
if (tx_chn->irq > 0)
22862286
devm_free_irq(dev, tx_chn->irq, tx_chn);
22872287

22882288
netif_napi_del(&tx_chn->napi_tx);

net/ipv4/tcp_cubic.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -392,6 +392,10 @@ static void hystart_update(struct sock *sk, u32 delay)
392392
if (after(tp->snd_una, ca->end_seq))
393393
bictcp_hystart_reset(sk);
394394

395+
/* hystart triggers when cwnd is larger than some threshold */
396+
if (tcp_snd_cwnd(tp) < hystart_low_window)
397+
return;
398+
395399
if (hystart_detect & HYSTART_ACK_TRAIN) {
396400
u32 now = bictcp_clock_us(sk);
397401

@@ -467,9 +471,7 @@ __bpf_kfunc static void cubictcp_acked(struct sock *sk, const struct ack_sample
467471
if (ca->delay_min == 0 || ca->delay_min > delay)
468472
ca->delay_min = delay;
469473

470-
/* hystart triggers when cwnd is larger than some threshold */
471-
if (!ca->found && tcp_in_slow_start(tp) && hystart &&
472-
tcp_snd_cwnd(tp) >= hystart_low_window)
474+
if (!ca->found && tcp_in_slow_start(tp) && hystart)
473475
hystart_update(sk, delay);
474476
}
475477

net/rose/af_rose.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -397,15 +397,15 @@ static int rose_setsockopt(struct socket *sock, int level, int optname,
397397
{
398398
struct sock *sk = sock->sk;
399399
struct rose_sock *rose = rose_sk(sk);
400-
int opt;
400+
unsigned int opt;
401401

402402
if (level != SOL_ROSE)
403403
return -ENOPROTOOPT;
404404

405-
if (optlen < sizeof(int))
405+
if (optlen < sizeof(unsigned int))
406406
return -EINVAL;
407407

408-
if (copy_from_sockptr(&opt, optval, sizeof(int)))
408+
if (copy_from_sockptr(&opt, optval, sizeof(unsigned int)))
409409
return -EFAULT;
410410

411411
switch (optname) {
@@ -414,31 +414,31 @@ static int rose_setsockopt(struct socket *sock, int level, int optname,
414414
return 0;
415415

416416
case ROSE_T1:
417-
if (opt < 1)
417+
if (opt < 1 || opt > UINT_MAX / HZ)
418418
return -EINVAL;
419419
rose->t1 = opt * HZ;
420420
return 0;
421421

422422
case ROSE_T2:
423-
if (opt < 1)
423+
if (opt < 1 || opt > UINT_MAX / HZ)
424424
return -EINVAL;
425425
rose->t2 = opt * HZ;
426426
return 0;
427427

428428
case ROSE_T3:
429-
if (opt < 1)
429+
if (opt < 1 || opt > UINT_MAX / HZ)
430430
return -EINVAL;
431431
rose->t3 = opt * HZ;
432432
return 0;
433433

434434
case ROSE_HOLDBACK:
435-
if (opt < 1)
435+
if (opt < 1 || opt > UINT_MAX / HZ)
436436
return -EINVAL;
437437
rose->hb = opt * HZ;
438438
return 0;
439439

440440
case ROSE_IDLE:
441-
if (opt < 0)
441+
if (opt > UINT_MAX / (60 * HZ))
442442
return -EINVAL;
443443
rose->idle = opt * 60 * HZ;
444444
return 0;

0 commit comments

Comments
 (0)