Skip to content

Commit ce55c22

Browse files
committed
Merge tag 'net-6.6-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
Pull networking fixes from Jakub Kicinski: "Including fixes from bluetooth, netfilter, WiFi. Feels like an up-tick in regression fixes, mostly for older releases. The hfsc fix, tcp_disconnect() and Intel WWAN fixes stand out as fairly clear-cut user reported regressions. The mlx5 DMA bug was causing strife for 390x folks. The fixes themselves are not particularly scary, tho. No open investigations / outstanding reports at the time of writing. Current release - regressions: - eth: mlx5: perform DMA operations in the right locations, make devices usable on s390x, again - sched: sch_hfsc: upgrade 'rt' to 'sc' when it becomes a inner curve, previous fix of rejecting invalid config broke some scripts - rfkill: reduce data->mtx scope in rfkill_fop_open, avoid deadlock - revert "ethtool: Fix mod state of verbose no_mask bitset", needs more work Current release - new code bugs: - tcp: fix listen() warning with v4-mapped-v6 address Previous releases - regressions: - tcp: allow tcp_disconnect() again when threads are waiting, it was denied to plug a constant source of bugs but turns out .NET depends on it - eth: mlx5: fix double-free if buffer refill fails under OOM - revert "net: wwan: iosm: enable runtime pm support for 7560", it's causing regressions and the WWAN team at Intel disappeared - tcp: tsq: relax tcp_small_queue_check() when rtx queue contains a single skb, fix single-stream perf regression on some devices Previous releases - always broken: - Bluetooth: - fix issues in legacy BR/EDR PIN code pairing - correctly bounds check and pad HCI_MON_NEW_INDEX name - netfilter: - more fixes / follow ups for the large "commit protocol" rework, which went in as a fix to 6.5 - fix null-derefs on netlink attrs which user may not pass in - tcp: fix excessive TLP and RACK timeouts from HZ rounding (bless Debian for keeping HZ=250 alive) - net: more strict VIRTIO_NET_HDR_GSO_UDP_L4 validation, prevent letting frankenstein UDP super-frames from getting into the stack - net: fix interface altnames when ifc moves to a new namespace - eth: qed: fix the size of the RX buffers - mptcp: avoid sending RST when closing the initial subflow" * tag 'net-6.6-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (94 commits) Revert "ethtool: Fix mod state of verbose no_mask bitset" selftests: mptcp: join: no RST when rm subflow/addr mptcp: avoid sending RST when closing the initial subflow mptcp: more conservative check for zero probes tcp: check mptcp-level constraints for backlog coalescing selftests: mptcp: join: correctly check for no RST net: ti: icssg-prueth: Fix r30 CMDs bitmasks selftests: net: add very basic test for netdev names and namespaces net: move altnames together with the netdevice net: avoid UAF on deleted altname net: check for altname conflicts when changing netdev's netns net: fix ifname in netlink ntf during netns move net: ethernet: ti: Fix mixed module-builtin object net: phy: bcm7xxx: Add missing 16nm EPHY statistics ipv4: fib: annotate races around nh->nh_saddr_genid and nh->nh_saddr tcp_bpf: properly release resources on error paths net/sched: sch_hfsc: upgrade 'rt' to 'sc' when it becomes a inner curve net: mdio-mux: fix C45 access returning -EIO after API change tcp: tsq: relax tcp_small_queue_check() when rtx queue contains a single skb octeon_ep: update BQL sent bytes before ringing doorbell ...
2 parents 74e9347 + 5245150 commit ce55c22

File tree

97 files changed

+967
-466
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

97 files changed

+967
-466
lines changed

Documentation/netlink/specs/devlink.yaml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,7 @@ operations:
323323
- dev-name
324324
- sb-index
325325
reply: &sb-get-reply
326-
value: 11
326+
value: 13
327327
attributes: *sb-id-attrs
328328
dump:
329329
request:
@@ -350,7 +350,7 @@ operations:
350350
- sb-index
351351
- sb-pool-index
352352
reply: &sb-pool-get-reply
353-
value: 15
353+
value: 17
354354
attributes: *sb-pool-id-attrs
355355
dump:
356356
request:
@@ -378,7 +378,7 @@ operations:
378378
- sb-index
379379
- sb-pool-index
380380
reply: &sb-port-pool-get-reply
381-
value: 19
381+
value: 21
382382
attributes: *sb-port-pool-id-attrs
383383
dump:
384384
request:
@@ -407,7 +407,7 @@ operations:
407407
- sb-pool-type
408408
- sb-tc-index
409409
reply: &sb-tc-pool-bind-get-reply
410-
value: 23
410+
value: 25
411411
attributes: *sb-tc-pool-bind-id-attrs
412412
dump:
413413
request:
@@ -538,7 +538,7 @@ operations:
538538
- dev-name
539539
- trap-name
540540
reply: &trap-get-reply
541-
value: 61
541+
value: 63
542542
attributes: *trap-id-attrs
543543
dump:
544544
request:
@@ -564,7 +564,7 @@ operations:
564564
- dev-name
565565
- trap-group-name
566566
reply: &trap-group-get-reply
567-
value: 65
567+
value: 67
568568
attributes: *trap-group-id-attrs
569569
dump:
570570
request:
@@ -590,7 +590,7 @@ operations:
590590
- dev-name
591591
- trap-policer-id
592592
reply: &trap-policer-get-reply
593-
value: 69
593+
value: 71
594594
attributes: *trap-policer-id-attrs
595595
dump:
596596
request:
@@ -617,7 +617,7 @@ operations:
617617
- port-index
618618
- rate-node-name
619619
reply: &rate-get-reply
620-
value: 74
620+
value: 76
621621
attributes: *rate-id-attrs
622622
dump:
623623
request:
@@ -643,7 +643,7 @@ operations:
643643
- dev-name
644644
- linecard-index
645645
reply: &linecard-get-reply
646-
value: 78
646+
value: 80
647647
attributes: *linecard-id-attrs
648648
dump:
649649
request:

Documentation/networking/representors.rst

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -162,9 +162,11 @@ How are representors identified?
162162
The representor netdevice should *not* directly refer to a PCIe device (e.g.
163163
through ``net_dev->dev.parent`` / ``SET_NETDEV_DEV()``), either of the
164164
representee or of the switchdev function.
165-
Instead, it should implement the ``ndo_get_devlink_port()`` netdevice op, which
166-
the kernel uses to provide the ``phys_switch_id`` and ``phys_port_name`` sysfs
167-
nodes. (Some legacy drivers implement ``ndo_get_port_parent_id()`` and
165+
Instead, the driver should use the ``SET_NETDEV_DEVLINK_PORT`` macro to
166+
assign a devlink port instance to the netdevice before registering the
167+
netdevice; the kernel uses the devlink port to provide the ``phys_switch_id``
168+
and ``phys_port_name`` sysfs nodes.
169+
(Some legacy drivers implement ``ndo_get_port_parent_id()`` and
168170
``ndo_get_phys_port_name()`` directly, but this is deprecated.) See
169171
:ref:`Documentation/networking/devlink/devlink-port.rst <devlink_port>` for the
170172
details of this API.

drivers/bluetooth/btrtl.c

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -962,13 +962,10 @@ static void btrtl_dmp_hdr(struct hci_dev *hdev, struct sk_buff *skb)
962962
skb_put_data(skb, buf, strlen(buf));
963963
}
964964

965-
static int btrtl_register_devcoredump_support(struct hci_dev *hdev)
965+
static void btrtl_register_devcoredump_support(struct hci_dev *hdev)
966966
{
967-
int err;
967+
hci_devcd_register(hdev, btrtl_coredump, btrtl_dmp_hdr, NULL);
968968

969-
err = hci_devcd_register(hdev, btrtl_coredump, btrtl_dmp_hdr, NULL);
970-
971-
return err;
972969
}
973970

974971
void btrtl_set_driver_name(struct hci_dev *hdev, const char *driver_name)
@@ -1255,8 +1252,7 @@ int btrtl_download_firmware(struct hci_dev *hdev,
12551252
}
12561253

12571254
done:
1258-
if (!err)
1259-
err = btrtl_register_devcoredump_support(hdev);
1255+
btrtl_register_devcoredump_support(hdev);
12601256

12611257
return err;
12621258
}

drivers/bluetooth/hci_vhci.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,10 @@ static int vhci_send_frame(struct hci_dev *hdev, struct sk_buff *skb)
7474
struct vhci_data *data = hci_get_drvdata(hdev);
7575

7676
memcpy(skb_push(skb, 1), &hci_skb_pkt_type(skb), 1);
77+
78+
mutex_lock(&data->open_mutex);
7779
skb_queue_tail(&data->readq, skb);
80+
mutex_unlock(&data->open_mutex);
7881

7982
wake_up_interruptible(&data->read_wait);
8083
return 0;

drivers/net/bonding/bond_main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4023,7 +4023,7 @@ static inline const void *bond_pull_data(struct sk_buff *skb,
40234023
if (likely(n <= hlen))
40244024
return data;
40254025
else if (skb && likely(pskb_may_pull(skb, n)))
4026-
return skb->head;
4026+
return skb->data;
40274027

40284028
return NULL;
40294029
}

drivers/net/dsa/bcm_sf2.c

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -617,17 +617,16 @@ static int bcm_sf2_mdio_register(struct dsa_switch *ds)
617617
dn = of_find_compatible_node(NULL, NULL, "brcm,unimac-mdio");
618618
priv->master_mii_bus = of_mdio_find_bus(dn);
619619
if (!priv->master_mii_bus) {
620-
of_node_put(dn);
621-
return -EPROBE_DEFER;
620+
err = -EPROBE_DEFER;
621+
goto err_of_node_put;
622622
}
623623

624-
get_device(&priv->master_mii_bus->dev);
625624
priv->master_mii_dn = dn;
626625

627626
priv->slave_mii_bus = mdiobus_alloc();
628627
if (!priv->slave_mii_bus) {
629-
of_node_put(dn);
630-
return -ENOMEM;
628+
err = -ENOMEM;
629+
goto err_put_master_mii_bus_dev;
631630
}
632631

633632
priv->slave_mii_bus->priv = priv;
@@ -684,18 +683,25 @@ static int bcm_sf2_mdio_register(struct dsa_switch *ds)
684683
}
685684

686685
err = mdiobus_register(priv->slave_mii_bus);
687-
if (err && dn) {
688-
mdiobus_free(priv->slave_mii_bus);
689-
of_node_put(dn);
690-
}
686+
if (err && dn)
687+
goto err_free_slave_mii_bus;
691688

689+
return 0;
690+
691+
err_free_slave_mii_bus:
692+
mdiobus_free(priv->slave_mii_bus);
693+
err_put_master_mii_bus_dev:
694+
put_device(&priv->master_mii_bus->dev);
695+
err_of_node_put:
696+
of_node_put(dn);
692697
return err;
693698
}
694699

695700
static void bcm_sf2_mdio_unregister(struct bcm_sf2_priv *priv)
696701
{
697702
mdiobus_unregister(priv->slave_mii_bus);
698703
mdiobus_free(priv->slave_mii_bus);
704+
put_device(&priv->master_mii_bus->dev);
699705
of_node_put(priv->master_mii_dn);
700706
}
701707

drivers/net/ethernet/chelsio/inline_crypto/chtls/chtls_io.c

Lines changed: 29 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -911,7 +911,7 @@ static int csk_wait_memory(struct chtls_dev *cdev,
911911
struct sock *sk, long *timeo_p)
912912
{
913913
DEFINE_WAIT_FUNC(wait, woken_wake_function);
914-
int err = 0;
914+
int ret, err = 0;
915915
long current_timeo;
916916
long vm_wait = 0;
917917
bool noblock;
@@ -942,10 +942,13 @@ static int csk_wait_memory(struct chtls_dev *cdev,
942942

943943
set_bit(SOCK_NOSPACE, &sk->sk_socket->flags);
944944
sk->sk_write_pending++;
945-
sk_wait_event(sk, &current_timeo, sk->sk_err ||
946-
(sk->sk_shutdown & SEND_SHUTDOWN) ||
947-
(csk_mem_free(cdev, sk) && !vm_wait), &wait);
945+
ret = sk_wait_event(sk, &current_timeo, sk->sk_err ||
946+
(sk->sk_shutdown & SEND_SHUTDOWN) ||
947+
(csk_mem_free(cdev, sk) && !vm_wait),
948+
&wait);
948949
sk->sk_write_pending--;
950+
if (ret < 0)
951+
goto do_error;
949952

950953
if (vm_wait) {
951954
vm_wait -= current_timeo;
@@ -1348,6 +1351,7 @@ static int chtls_pt_recvmsg(struct sock *sk, struct msghdr *msg, size_t len,
13481351
int copied = 0;
13491352
int target;
13501353
long timeo;
1354+
int ret;
13511355

13521356
buffers_freed = 0;
13531357

@@ -1423,7 +1427,11 @@ static int chtls_pt_recvmsg(struct sock *sk, struct msghdr *msg, size_t len,
14231427
if (copied >= target)
14241428
break;
14251429
chtls_cleanup_rbuf(sk, copied);
1426-
sk_wait_data(sk, &timeo, NULL);
1430+
ret = sk_wait_data(sk, &timeo, NULL);
1431+
if (ret < 0) {
1432+
copied = copied ? : ret;
1433+
goto unlock;
1434+
}
14271435
continue;
14281436
found_ok_skb:
14291437
if (!skb->len) {
@@ -1518,6 +1526,8 @@ static int chtls_pt_recvmsg(struct sock *sk, struct msghdr *msg, size_t len,
15181526

15191527
if (buffers_freed)
15201528
chtls_cleanup_rbuf(sk, copied);
1529+
1530+
unlock:
15211531
release_sock(sk);
15221532
return copied;
15231533
}
@@ -1534,6 +1544,7 @@ static int peekmsg(struct sock *sk, struct msghdr *msg,
15341544
int copied = 0;
15351545
size_t avail; /* amount of available data in current skb */
15361546
long timeo;
1547+
int ret;
15371548

15381549
lock_sock(sk);
15391550
timeo = sock_rcvtimeo(sk, flags & MSG_DONTWAIT);
@@ -1585,7 +1596,12 @@ static int peekmsg(struct sock *sk, struct msghdr *msg,
15851596
release_sock(sk);
15861597
lock_sock(sk);
15871598
} else {
1588-
sk_wait_data(sk, &timeo, NULL);
1599+
ret = sk_wait_data(sk, &timeo, NULL);
1600+
if (ret < 0) {
1601+
/* here 'copied' is 0 due to previous checks */
1602+
copied = ret;
1603+
break;
1604+
}
15891605
}
15901606

15911607
if (unlikely(peek_seq != tp->copied_seq)) {
@@ -1656,6 +1672,7 @@ int chtls_recvmsg(struct sock *sk, struct msghdr *msg, size_t len,
16561672
int copied = 0;
16571673
long timeo;
16581674
int target; /* Read at least this many bytes */
1675+
int ret;
16591676

16601677
buffers_freed = 0;
16611678

@@ -1747,7 +1764,11 @@ int chtls_recvmsg(struct sock *sk, struct msghdr *msg, size_t len,
17471764
if (copied >= target)
17481765
break;
17491766
chtls_cleanup_rbuf(sk, copied);
1750-
sk_wait_data(sk, &timeo, NULL);
1767+
ret = sk_wait_data(sk, &timeo, NULL);
1768+
if (ret < 0) {
1769+
copied = copied ? : ret;
1770+
goto unlock;
1771+
}
17511772
continue;
17521773

17531774
found_ok_skb:
@@ -1816,6 +1837,7 @@ int chtls_recvmsg(struct sock *sk, struct msghdr *msg, size_t len,
18161837
if (buffers_freed)
18171838
chtls_cleanup_rbuf(sk, copied);
18181839

1840+
unlock:
18191841
release_sock(sk);
18201842
return copied;
18211843
}

drivers/net/ethernet/google/gve/gve_rx.c

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ static int gve_prefill_rx_pages(struct gve_rx_ring *rx)
146146
err = gve_rx_alloc_buffer(priv, &priv->pdev->dev, &rx->data.page_info[i],
147147
&rx->data.data_ring[i]);
148148
if (err)
149-
goto alloc_err;
149+
goto alloc_err_rda;
150150
}
151151

152152
if (!rx->data.raw_addressing) {
@@ -171,12 +171,26 @@ static int gve_prefill_rx_pages(struct gve_rx_ring *rx)
171171
return slots;
172172

173173
alloc_err_qpl:
174+
/* Fully free the copy pool pages. */
174175
while (j--) {
175176
page_ref_sub(rx->qpl_copy_pool[j].page,
176177
rx->qpl_copy_pool[j].pagecnt_bias - 1);
177178
put_page(rx->qpl_copy_pool[j].page);
178179
}
179-
alloc_err:
180+
181+
/* Do not fully free QPL pages - only remove the bias added in this
182+
* function with gve_setup_rx_buffer.
183+
*/
184+
while (i--)
185+
page_ref_sub(rx->data.page_info[i].page,
186+
rx->data.page_info[i].pagecnt_bias - 1);
187+
188+
gve_unassign_qpl(priv, rx->data.qpl->id);
189+
rx->data.qpl = NULL;
190+
191+
return err;
192+
193+
alloc_err_rda:
180194
while (i--)
181195
gve_rx_free_buffer(&priv->pdev->dev,
182196
&rx->data.page_info[i],

drivers/net/ethernet/intel/i40e/i40e_common.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1082,7 +1082,7 @@ void i40e_clear_hw(struct i40e_hw *hw)
10821082
I40E_PFLAN_QALLOC_FIRSTQ_SHIFT;
10831083
j = (val & I40E_PFLAN_QALLOC_LASTQ_MASK) >>
10841084
I40E_PFLAN_QALLOC_LASTQ_SHIFT;
1085-
if (val & I40E_PFLAN_QALLOC_VALID_MASK)
1085+
if (val & I40E_PFLAN_QALLOC_VALID_MASK && j >= base_queue)
10861086
num_queues = (j - base_queue) + 1;
10871087
else
10881088
num_queues = 0;
@@ -1092,7 +1092,7 @@ void i40e_clear_hw(struct i40e_hw *hw)
10921092
I40E_PF_VT_PFALLOC_FIRSTVF_SHIFT;
10931093
j = (val & I40E_PF_VT_PFALLOC_LASTVF_MASK) >>
10941094
I40E_PF_VT_PFALLOC_LASTVF_SHIFT;
1095-
if (val & I40E_PF_VT_PFALLOC_VALID_MASK)
1095+
if (val & I40E_PF_VT_PFALLOC_VALID_MASK && j >= i)
10961096
num_vfs = (j - i) + 1;
10971097
else
10981098
num_vfs = 0;

drivers/net/ethernet/intel/ice/ice_lib.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1201,8 +1201,7 @@ static void ice_set_rss_vsi_ctx(struct ice_vsi_ctx *ctxt, struct ice_vsi *vsi)
12011201

12021202
ctxt->info.q_opt_rss = ((lut_type << ICE_AQ_VSI_Q_OPT_RSS_LUT_S) &
12031203
ICE_AQ_VSI_Q_OPT_RSS_LUT_M) |
1204-
((hash_type << ICE_AQ_VSI_Q_OPT_RSS_HASH_S) &
1205-
ICE_AQ_VSI_Q_OPT_RSS_HASH_M);
1204+
(hash_type & ICE_AQ_VSI_Q_OPT_RSS_HASH_M);
12061205
}
12071206

12081207
static void

0 commit comments

Comments
 (0)