Skip to content

Commit

Permalink
Merge tag 'net-6.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel…
Browse files Browse the repository at this point in the history
…/git/netdev/net

Pull networking fixes from Jakub Kicinski:
 "Including fixes from IPSec, netfilter and Bluetooth.

  Nothing really stands out, but as usual there's a slight concentration
  of fixes for issues added in the last two weeks before the merge
  window, and driver bugs from 6.13 which tend to get discovered upon
  wider distribution.

  Current release - regressions:

   - net: revert RTNL changes in unregister_netdevice_many_notify()

   - Bluetooth: fix possible infinite recursion of btusb_reset

   - eth: adjust locking in some old drivers which protect their state
     with spinlocks to avoid sleeping in atomic; core protects netdev
     state with a mutex now

  Previous releases - regressions:

   - eth:
      - mlx5e: make sure we pass node ID, not CPU ID to kvzalloc_node()
      - bgmac: reduce max frame size to support just 1500 bytes; the
        jumbo frame support would previously cause OOB writes, but now
        fails outright

   - mptcp: blackhole only if 1st SYN retrans w/o MPC is accepted, avoid
     false detection of MPTCP blackholing

  Previous releases - always broken:

   - mptcp: handle fastopen disconnect correctly

   - xfrm:
      - make sure skb->sk is a full sock before accessing its fields
      - fix taking a lock with preempt disabled for RT kernels

   - usb: ipheth: improve safety of packet metadata parsing; prevent
     potential OOB accesses

   - eth: renesas: fix missing rtnl lock in suspend/resume path"

* tag 'net-6.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (88 commits)
  MAINTAINERS: add Neal to TCP maintainers
  net: revert RTNL changes in unregister_netdevice_many_notify()
  net: hsr: fix fill_frame_info() regression vs VLAN packets
  doc: mptcp: sysctl: blackhole_timeout is per-netns
  mptcp: blackhole only if 1st SYN retrans w/o MPC is accepted
  netfilter: nf_tables: reject mismatching sum of field_len with set key length
  net: sh_eth: Fix missing rtnl lock in suspend/resume path
  net: ravb: Fix missing rtnl lock in suspend/resume path
  selftests/net: Add test for loading devbound XDP program in generic mode
  net: xdp: Disallow attaching device-bound programs in generic mode
  tcp: correct handling of extreme memory squeeze
  bgmac: reduce max frame size to support just MTU 1500
  vsock/test: Add test for connect() retries
  vsock/test: Add test for UAF due to socket unbinding
  vsock/test: Introduce vsock_connect_fd()
  vsock/test: Introduce vsock_bind()
  vsock: Allow retrying on connect() failure
  vsock: Keep the binding until socket destruction
  Bluetooth: L2CAP: accept zero as a special value for MTU auto-selection
  Bluetooth: btnxpuart: Fix glitches seen in dual A2DP streaming
  ...
  • Loading branch information
Linus Torvalds committed Jan 30, 2025
2 parents b4b0881 + dfffacc commit c2933b2
Show file tree
Hide file tree
Showing 103 changed files with 877 additions and 420 deletions.
9 changes: 9 additions & 0 deletions Documentation/ABI/stable/sysfs-class-bluetooth
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
What: /sys/class/bluetooth/hci<index>/reset
Date: 14-Jan-2025
KernelVersion: 6.13
Contact: linux-bluetooth@vger.kernel.org
Description: This write-only attribute allows users to trigger the vendor reset
method on the Bluetooth device when arbitrary data is written.
The reset may or may not be done through the device transport
(e.g., UART/USB), and can also be done through an out-of-band
approach such as GPIO.
8 changes: 4 additions & 4 deletions Documentation/devicetree/bindings/net/qcom,ethqos.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@ properties:
oneOf:
- items:
- enum:
- qcom,qcs8300-ethqos
- const: qcom,sa8775p-ethqos
- qcom,qcs615-ethqos
- const: qcom,qcs404-ethqos
- items:
- enum:
- qcom,qcs615-ethqos
- const: qcom,sm8150-ethqos
- qcom,qcs8300-ethqos
- const: qcom,sa8775p-ethqos
- enum:
- qcom,qcs404-ethqos
- qcom,sa8775p-ethqos
Expand Down
4 changes: 2 additions & 2 deletions Documentation/networking/can.rst
Original file line number Diff line number Diff line change
Expand Up @@ -699,10 +699,10 @@ RAW socket option CAN_RAW_JOIN_FILTERS

The CAN_RAW socket can set multiple CAN identifier specific filters that
lead to multiple filters in the af_can.c filter processing. These filters
are indenpendent from each other which leads to logical OR'ed filters when
are independent from each other which leads to logical OR'ed filters when
applied (see :ref:`socketcan-rawfilter`).

This socket option joines the given CAN filters in the way that only CAN
This socket option joins the given CAN filters in the way that only CAN
frames are passed to user space that matched *all* given CAN filters. The
semantic for the applied filters is therefore changed to a logical AND.

Expand Down
2 changes: 1 addition & 1 deletion Documentation/networking/mptcp-sysctl.rst
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ blackhole_timeout - INTEGER (seconds)
MPTCP is re-enabled and will reset to the initial value when the
blackhole issue goes away.

0 to disable the blackhole detection.
0 to disable the blackhole detection. This is a per-namespace sysctl.

Default: 3600

Expand Down
2 changes: 1 addition & 1 deletion Documentation/networking/napi.rst
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ It is expected that ``irq-suspend-timeout`` will be set to a value much larger
than ``gro_flush_timeout`` as ``irq-suspend-timeout`` should suspend IRQs for
the duration of one userland processing cycle.

While it is not stricly necessary to use ``napi_defer_hard_irqs`` and
While it is not strictly necessary to use ``napi_defer_hard_irqs`` and
``gro_flush_timeout`` to use IRQ suspension, their use is strongly
recommended.

Expand Down
3 changes: 3 additions & 0 deletions MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -4102,6 +4102,7 @@ S: Supported
W: http://www.bluez.org/
T: git git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth.git
T: git git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next.git
F: Documentation/ABI/stable/sysfs-class-bluetooth
F: include/net/bluetooth/
F: net/bluetooth/

Expand Down Expand Up @@ -16277,6 +16278,7 @@ F: drivers/scsi/sun3_scsi_vme.c

NCSI LIBRARY
M: Samuel Mendoza-Jonas <sam@mendozajonas.com>
R: Paul Fertser <fercerpav@gmail.com>
S: Maintained
F: net/ncsi/

Expand Down Expand Up @@ -16611,6 +16613,7 @@ F: tools/testing/selftests/net/mptcp/

NETWORKING [TCP]
M: Eric Dumazet <edumazet@google.com>
M: Neal Cardwell <ncardwell@google.com>
L: netdev@vger.kernel.org
S: Maintained
F: Documentation/networking/net_cachelines/tcp_sock.rst
Expand Down
3 changes: 1 addition & 2 deletions drivers/bluetooth/btnxpuart.c
Original file line number Diff line number Diff line change
Expand Up @@ -1381,13 +1381,12 @@ static void btnxpuart_tx_work(struct work_struct *work)

while ((skb = nxp_dequeue(nxpdev))) {
len = serdev_device_write_buf(serdev, skb->data, skb->len);
serdev_device_wait_until_sent(serdev, 0);
hdev->stat.byte_tx += len;

skb_pull(skb, len);
if (skb->len > 0) {
skb_queue_head(&nxpdev->txq, skb);
break;
continue;
}

switch (hci_skb_pkt_type(skb)) {
Expand Down
12 changes: 7 additions & 5 deletions drivers/bluetooth/btusb.c
Original file line number Diff line number Diff line change
Expand Up @@ -899,11 +899,6 @@ static void btusb_reset(struct hci_dev *hdev)
struct btusb_data *data;
int err;

if (hdev->reset) {
hdev->reset(hdev);
return;
}

data = hci_get_drvdata(hdev);
/* This is not an unbalanced PM reference since the device will reset */
err = usb_autopm_get_interface(data->intf);
Expand Down Expand Up @@ -2639,8 +2634,15 @@ static void btusb_mtk_claim_iso_intf(struct btusb_data *data)
struct btmtk_data *btmtk_data = hci_get_priv(data->hdev);
int err;

/*
* The function usb_driver_claim_interface() is documented to need
* locks held if it's not called from a probe routine. The code here
* is called from the hci_power_on workqueue, so grab the lock.
*/
device_lock(&btmtk_data->isopkt_intf->dev);
err = usb_driver_claim_interface(&btusb_driver,
btmtk_data->isopkt_intf, data);
device_unlock(&btmtk_data->isopkt_intf->dev);
if (err < 0) {
btmtk_data->isopkt_intf = NULL;
bt_dev_err(data->hdev, "Failed to claim iso interface");
Expand Down
19 changes: 10 additions & 9 deletions drivers/net/bonding/bond_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1538,17 +1538,20 @@ static netdev_features_t bond_fix_features(struct net_device *dev,
NETIF_F_HIGHDMA | NETIF_F_LRO)

#define BOND_ENC_FEATURES (NETIF_F_HW_CSUM | NETIF_F_SG | \
NETIF_F_RXCSUM | NETIF_F_GSO_SOFTWARE)
NETIF_F_RXCSUM | NETIF_F_GSO_SOFTWARE | \
NETIF_F_GSO_PARTIAL)

#define BOND_MPLS_FEATURES (NETIF_F_HW_CSUM | NETIF_F_SG | \
NETIF_F_GSO_SOFTWARE)

#define BOND_GSO_PARTIAL_FEATURES (NETIF_F_GSO_ESP)


static void bond_compute_features(struct bonding *bond)
{
netdev_features_t gso_partial_features = BOND_GSO_PARTIAL_FEATURES;
unsigned int dst_release_flag = IFF_XMIT_DST_RELEASE |
IFF_XMIT_DST_RELEASE_PERM;
netdev_features_t gso_partial_features = NETIF_F_GSO_ESP;
netdev_features_t vlan_features = BOND_VLAN_FEATURES;
netdev_features_t enc_features = BOND_ENC_FEATURES;
#ifdef CONFIG_XFRM_OFFLOAD
Expand Down Expand Up @@ -1582,8 +1585,9 @@ static void bond_compute_features(struct bonding *bond)
BOND_XFRM_FEATURES);
#endif /* CONFIG_XFRM_OFFLOAD */

if (slave->dev->hw_enc_features & NETIF_F_GSO_PARTIAL)
gso_partial_features &= slave->dev->gso_partial_features;
gso_partial_features = netdev_increment_features(gso_partial_features,
slave->dev->gso_partial_features,
BOND_GSO_PARTIAL_FEATURES);

mpls_features = netdev_increment_features(mpls_features,
slave->dev->mpls_features,
Expand All @@ -1598,12 +1602,8 @@ static void bond_compute_features(struct bonding *bond)
}
bond_dev->hard_header_len = max_hard_header_len;

if (gso_partial_features & NETIF_F_GSO_ESP)
bond_dev->gso_partial_features |= NETIF_F_GSO_ESP;
else
bond_dev->gso_partial_features &= ~NETIF_F_GSO_ESP;

done:
bond_dev->gso_partial_features = gso_partial_features;
bond_dev->vlan_features = vlan_features;
bond_dev->hw_enc_features = enc_features | NETIF_F_GSO_ENCAP_ALL |
NETIF_F_HW_VLAN_CTAG_TX |
Expand Down Expand Up @@ -6046,6 +6046,7 @@ void bond_setup(struct net_device *bond_dev)
bond_dev->hw_features |= NETIF_F_GSO_ENCAP_ALL;
bond_dev->features |= bond_dev->hw_features;
bond_dev->features |= NETIF_F_HW_VLAN_CTAG_TX | NETIF_F_HW_VLAN_STAG_TX;
bond_dev->features |= NETIF_F_GSO_PARTIAL;
#ifdef CONFIG_XFRM_OFFLOAD
bond_dev->hw_features |= BOND_XFRM_FEATURES;
/* Only enable XFRM features if this is an active-backup config */
Expand Down
3 changes: 1 addition & 2 deletions drivers/net/ethernet/broadcom/bgmac.h
Original file line number Diff line number Diff line change
Expand Up @@ -328,8 +328,7 @@
#define BGMAC_RX_FRAME_OFFSET 30 /* There are 2 unused bytes between header and real data */
#define BGMAC_RX_BUF_OFFSET (NET_SKB_PAD + NET_IP_ALIGN - \
BGMAC_RX_FRAME_OFFSET)
/* Jumbo frame size with FCS */
#define BGMAC_RX_MAX_FRAME_SIZE 9724
#define BGMAC_RX_MAX_FRAME_SIZE 1536
#define BGMAC_RX_BUF_SIZE (BGMAC_RX_FRAME_OFFSET + BGMAC_RX_MAX_FRAME_SIZE)
#define BGMAC_RX_ALLOC_SIZE (SKB_DATA_ALIGN(BGMAC_RX_BUF_SIZE + BGMAC_RX_BUF_OFFSET) + \
SKB_DATA_ALIGN(sizeof(struct skb_shared_info)))
Expand Down
35 changes: 31 additions & 4 deletions drivers/net/ethernet/broadcom/tg3.c
Original file line number Diff line number Diff line change
Expand Up @@ -7424,7 +7424,7 @@ static void tg3_napi_enable(struct tg3 *tp)

for (i = 0; i < tp->irq_cnt; i++) {
tnapi = &tp->napi[i];
napi_enable(&tnapi->napi);
napi_enable_locked(&tnapi->napi);
if (tnapi->tx_buffers) {
netif_queue_set_napi(tp->dev, txq_idx,
NETDEV_QUEUE_TYPE_TX,
Expand All @@ -7445,9 +7445,10 @@ static void tg3_napi_init(struct tg3 *tp)
int i;

for (i = 0; i < tp->irq_cnt; i++) {
netif_napi_add(tp->dev, &tp->napi[i].napi,
i ? tg3_poll_msix : tg3_poll);
netif_napi_set_irq(&tp->napi[i].napi, tp->napi[i].irq_vec);
netif_napi_add_locked(tp->dev, &tp->napi[i].napi,
i ? tg3_poll_msix : tg3_poll);
netif_napi_set_irq_locked(&tp->napi[i].napi,
tp->napi[i].irq_vec);
}
}

Expand Down Expand Up @@ -11259,6 +11260,8 @@ static void tg3_timer_stop(struct tg3 *tp)
static int tg3_restart_hw(struct tg3 *tp, bool reset_phy)
__releases(tp->lock)
__acquires(tp->lock)
__releases(tp->dev->lock)
__acquires(tp->dev->lock)
{
int err;

Expand All @@ -11271,7 +11274,9 @@ static int tg3_restart_hw(struct tg3 *tp, bool reset_phy)
tg3_timer_stop(tp);
tp->irq_sync = 0;
tg3_napi_enable(tp);
netdev_unlock(tp->dev);
dev_close(tp->dev);
netdev_lock(tp->dev);
tg3_full_lock(tp, 0);
}
return err;
Expand Down Expand Up @@ -11299,6 +11304,7 @@ static void tg3_reset_task(struct work_struct *work)

tg3_netif_stop(tp);

netdev_lock(tp->dev);
tg3_full_lock(tp, 1);

if (tg3_flag(tp, TX_RECOVERY_PENDING)) {
Expand All @@ -11318,12 +11324,14 @@ static void tg3_reset_task(struct work_struct *work)
* call cancel_work_sync() and wait forever.
*/
tg3_flag_clear(tp, RESET_TASK_PENDING);
netdev_unlock(tp->dev);
dev_close(tp->dev);
goto out;
}

tg3_netif_start(tp);
tg3_full_unlock(tp);
netdev_unlock(tp->dev);
tg3_phy_start(tp);
tg3_flag_clear(tp, RESET_TASK_PENDING);
out:
Expand Down Expand Up @@ -11683,9 +11691,11 @@ static int tg3_start(struct tg3 *tp, bool reset_phy, bool test_irq,
if (err)
goto out_ints_fini;

netdev_lock(dev);
tg3_napi_init(tp);

tg3_napi_enable(tp);
netdev_unlock(dev);

for (i = 0; i < tp->irq_cnt; i++) {
err = tg3_request_irq(tp, i);
Expand Down Expand Up @@ -12569,6 +12579,7 @@ static int tg3_set_ringparam(struct net_device *dev,
irq_sync = 1;
}

netdev_lock(dev);
tg3_full_lock(tp, irq_sync);

tp->rx_pending = ering->rx_pending;
Expand Down Expand Up @@ -12597,6 +12608,7 @@ static int tg3_set_ringparam(struct net_device *dev,
}

tg3_full_unlock(tp);
netdev_unlock(dev);

if (irq_sync && !err)
tg3_phy_start(tp);
Expand Down Expand Up @@ -12678,6 +12690,7 @@ static int tg3_set_pauseparam(struct net_device *dev, struct ethtool_pauseparam
irq_sync = 1;
}

netdev_lock(dev);
tg3_full_lock(tp, irq_sync);

if (epause->autoneg)
Expand Down Expand Up @@ -12707,6 +12720,7 @@ static int tg3_set_pauseparam(struct net_device *dev, struct ethtool_pauseparam
}

tg3_full_unlock(tp);
netdev_unlock(dev);
}

tp->phy_flags |= TG3_PHYFLG_USER_CONFIGURED;
Expand Down Expand Up @@ -13911,6 +13925,7 @@ static void tg3_self_test(struct net_device *dev, struct ethtool_test *etest,
data[TG3_INTERRUPT_TEST] = 1;
}

netdev_lock(dev);
tg3_full_lock(tp, 0);

tg3_halt(tp, RESET_KIND_SHUTDOWN, 1);
Expand All @@ -13922,6 +13937,7 @@ static void tg3_self_test(struct net_device *dev, struct ethtool_test *etest,
}

tg3_full_unlock(tp);
netdev_unlock(dev);

if (irq_sync && !err2)
tg3_phy_start(tp);
Expand Down Expand Up @@ -14365,6 +14381,7 @@ static int tg3_change_mtu(struct net_device *dev, int new_mtu)

tg3_set_mtu(dev, tp, new_mtu);

netdev_lock(dev);
tg3_full_lock(tp, 1);

tg3_halt(tp, RESET_KIND_SHUTDOWN, 1);
Expand All @@ -14384,6 +14401,7 @@ static int tg3_change_mtu(struct net_device *dev, int new_mtu)
tg3_netif_start(tp);

tg3_full_unlock(tp);
netdev_unlock(dev);

if (!err)
tg3_phy_start(tp);
Expand Down Expand Up @@ -18164,6 +18182,7 @@ static int tg3_resume(struct device *device)

netif_device_attach(dev);

netdev_lock(dev);
tg3_full_lock(tp, 0);

tg3_ape_driver_state_change(tp, RESET_KIND_INIT);
Expand All @@ -18180,6 +18199,7 @@ static int tg3_resume(struct device *device)

out:
tg3_full_unlock(tp);
netdev_unlock(dev);

if (!err)
tg3_phy_start(tp);
Expand Down Expand Up @@ -18260,7 +18280,9 @@ static pci_ers_result_t tg3_io_error_detected(struct pci_dev *pdev,
done:
if (state == pci_channel_io_perm_failure) {
if (netdev) {
netdev_lock(netdev);
tg3_napi_enable(tp);
netdev_unlock(netdev);
dev_close(netdev);
}
err = PCI_ERS_RESULT_DISCONNECT;
Expand Down Expand Up @@ -18314,7 +18336,9 @@ static pci_ers_result_t tg3_io_slot_reset(struct pci_dev *pdev)

done:
if (rc != PCI_ERS_RESULT_RECOVERED && netdev && netif_running(netdev)) {
netdev_lock(netdev);
tg3_napi_enable(tp);
netdev_unlock(netdev);
dev_close(netdev);
}
rtnl_unlock();
Expand All @@ -18340,12 +18364,14 @@ static void tg3_io_resume(struct pci_dev *pdev)
if (!netdev || !netif_running(netdev))
goto done;

netdev_lock(netdev);
tg3_full_lock(tp, 0);
tg3_ape_driver_state_change(tp, RESET_KIND_INIT);
tg3_flag_set(tp, INIT_COMPLETE);
err = tg3_restart_hw(tp, true);
if (err) {
tg3_full_unlock(tp);
netdev_unlock(netdev);
netdev_err(netdev, "Cannot restart hardware after reset.\n");
goto done;
}
Expand All @@ -18357,6 +18383,7 @@ static void tg3_io_resume(struct pci_dev *pdev)
tg3_netif_start(tp);

tg3_full_unlock(tp);
netdev_unlock(netdev);

tg3_phy_start(tp);

Expand Down
Loading

0 comments on commit c2933b2

Please sign in to comment.