Skip to content

Commit d69eb20

Browse files
committed
Merge tag 'net-6.17-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
Pull networking fixes from Jakub Kicinski: "Including fixes from netfilter, wireless and Bluetooth. We're reverting the removal of a Sundance driver, a user has appeared. This makes the PR rather large in terms of LoC. There's a conspicuous absence of real, user-reported 6.17 issues. Slightly worried that the summer distracted people from testing. Previous releases - regressions: - ax25: properly unshare skbs in ax25_kiss_rcv() Previous releases - always broken: - phylink: disable autoneg for interfaces that have no inband, fix regression on pcs-lynx (NXP LS1088) - vxlan: fix null-deref when using nexthop objects - batman-adv: fix OOB read/write in network-coding decode - icmp: icmp_ndo_send: fix reversing address translation for replies - tcp: fix socket ref leak in TCP-AO failure handling for IPv6 - mctp: - mctp_fraq_queue should take ownership of passed skb - usb: initialise mac header in RX path, avoid WARN - wifi: mac80211: do not permit 40 MHz EHT operation on 5/6 GHz, respect device limitations - wifi: wilc1000: avoid buffer overflow in WID string configuration - wifi: mt76: - fix regressions from mt7996 MLO support rework - fix offchannel handling issues on mt7996 - fix multiple wcid linked list corruption issues - mt7921: don't disconnect when AP requests switch to a channel which requires radar detection - mt7925u: use connac3 tx aggr check in tx complete - wifi: intel: - improve validation of ACPI DSM data - cfg: restore some 1000 series configs - wifi: ath: - ath11k: a fix for GTK rekeying - ath12k: a missed WiFi7 capability (multi-link EMLSR) - eth: intel: - ice: fix races in "low latency" firmware interface for Tx timestamps - idpf: set mac type when adding and removing MAC filters - i40e: remove racy read access to some debugfs files Misc: - Revert "eth: remove the DLink/Sundance (ST201) driver" - netfilter: conntrack: helper: Replace -EEXIST by -EBUSY, avoid confusing modprobe" * tag 'net-6.17-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (99 commits) phy: mscc: Stop taking ts_lock for tx_queue and use its own lock selftest: net: Fix weird setsockopt() in bind_bhash.c. MAINTAINERS: add Sabrina to TLS maintainers gve: update MAINTAINERS ppp: fix memory leak in pad_compress_skb net: xilinx: axienet: Add error handling for RX metadata pointer retrieval net: atm: fix memory leak in atm_register_sysfs when device_register fail netfilter: nf_tables: Introduce NFTA_DEVICE_PREFIX selftests: netfilter: fix udpclash tool hang ax25: properly unshare skbs in ax25_kiss_rcv() mctp: return -ENOPROTOOPT for unknown getsockopt options net/smc: Remove validation of reserved bits in CLC Decline message ipv4: Fix NULL vs error pointer check in inet_blackhole_dev_init() net: thunder_bgx: decrement cleanup index before use net: thunder_bgx: add a missing of_node_put net: phylink: move PHY interrupt request to non-fail path net: lockless sock_i_ino() tools: ynl-gen: fix nested array counting wifi: wilc1000: avoid buffer overflow in WID string configuration wifi: cfg80211: sme: cap SSID length in __cfg80211_connect_result() ...
2 parents 68f285e + 9b2bfdb commit d69eb20

File tree

105 files changed

+3116
-491
lines changed

Some content is hidden

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

105 files changed

+3116
-491
lines changed

Documentation/networking/napi.rst

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -433,9 +433,8 @@ Threaded NAPI
433433

434434
Threaded NAPI is an operating mode that uses dedicated kernel
435435
threads rather than software IRQ context for NAPI processing.
436-
The configuration is per netdevice and will affect all
437-
NAPI instances of that device. Each NAPI instance will spawn a separate
438-
thread (called ``napi/${ifc-name}-${napi-id}``).
436+
Each threaded NAPI instance will spawn a separate thread
437+
(called ``napi/${ifc-name}-${napi-id}``).
439438

440439
It is recommended to pin each kernel thread to a single CPU, the same
441440
CPU as the CPU which services the interrupt. Note that the mapping

MAINTAINERS

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10389,7 +10389,7 @@ S: Maintained
1038910389
F: drivers/input/touchscreen/goodix*
1039010390

1039110391
GOOGLE ETHERNET DRIVERS
10392-
M: Jeroen de Borst <jeroendb@google.com>
10392+
M: Joshua Washington <joshwash@google.com>
1039310393
M: Harshitha Ramamurthy <[email protected]>
1039410394
1039510395
S: Maintained
@@ -17851,6 +17851,7 @@ F: net/ipv6/tcp*.c
1785117851
NETWORKING [TLS]
1785217852
M: John Fastabend <[email protected]>
1785317853
M: Jakub Kicinski <[email protected]>
17854+
M: Sabrina Dubroca <[email protected]>
1785417855
1785517856
S: Maintained
1785617857
F: include/net/tls.h
@@ -24253,6 +24254,12 @@ S: Maintained
2425324254
F: Documentation/devicetree/bindings/input/allwinner,sun4i-a10-lradc-keys.yaml
2425424255
F: drivers/input/keyboard/sun4i-lradc-keys.c
2425524256

24257+
SUNDANCE NETWORK DRIVER
24258+
M: Denis Kirjanov <[email protected]>
24259+
24260+
S: Maintained
24261+
F: drivers/net/ethernet/dlink/sundance.c
24262+
2425624263
SUNPLUS ETHERNET DRIVER
2425724264
M: Wells Lu <[email protected]>
2425824265

arch/mips/configs/mtx1_defconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -273,6 +273,7 @@ CONFIG_DM9102=m
273273
CONFIG_ULI526X=m
274274
CONFIG_PCMCIA_XIRCOM=m
275275
CONFIG_DL2K=m
276+
CONFIG_SUNDANCE=m
276277
CONFIG_PCMCIA_FMVJ18X=m
277278
CONFIG_E100=m
278279
CONFIG_E1000=m

arch/powerpc/configs/ppc6xx_defconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -433,6 +433,7 @@ CONFIG_DM9102=m
433433
CONFIG_ULI526X=m
434434
CONFIG_PCMCIA_XIRCOM=m
435435
CONFIG_DL2K=m
436+
CONFIG_SUNDANCE=m
436437
CONFIG_S2IO=m
437438
CONFIG_FEC_MPC52xx=m
438439
CONFIG_GIANFAR=m

drivers/bluetooth/hci_vhci.c

Lines changed: 41 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -380,6 +380,28 @@ static const struct file_operations force_devcoredump_fops = {
380380
.write = force_devcd_write,
381381
};
382382

383+
static void vhci_debugfs_init(struct vhci_data *data)
384+
{
385+
struct hci_dev *hdev = data->hdev;
386+
387+
debugfs_create_file("force_suspend", 0644, hdev->debugfs, data,
388+
&force_suspend_fops);
389+
390+
debugfs_create_file("force_wakeup", 0644, hdev->debugfs, data,
391+
&force_wakeup_fops);
392+
393+
if (IS_ENABLED(CONFIG_BT_MSFTEXT))
394+
debugfs_create_file("msft_opcode", 0644, hdev->debugfs, data,
395+
&msft_opcode_fops);
396+
397+
if (IS_ENABLED(CONFIG_BT_AOSPEXT))
398+
debugfs_create_file("aosp_capable", 0644, hdev->debugfs, data,
399+
&aosp_capable_fops);
400+
401+
debugfs_create_file("force_devcoredump", 0644, hdev->debugfs, data,
402+
&force_devcoredump_fops);
403+
}
404+
383405
static int __vhci_create_device(struct vhci_data *data, __u8 opcode)
384406
{
385407
struct hci_dev *hdev;
@@ -434,22 +456,8 @@ static int __vhci_create_device(struct vhci_data *data, __u8 opcode)
434456
return -EBUSY;
435457
}
436458

437-
debugfs_create_file("force_suspend", 0644, hdev->debugfs, data,
438-
&force_suspend_fops);
439-
440-
debugfs_create_file("force_wakeup", 0644, hdev->debugfs, data,
441-
&force_wakeup_fops);
442-
443-
if (IS_ENABLED(CONFIG_BT_MSFTEXT))
444-
debugfs_create_file("msft_opcode", 0644, hdev->debugfs, data,
445-
&msft_opcode_fops);
446-
447-
if (IS_ENABLED(CONFIG_BT_AOSPEXT))
448-
debugfs_create_file("aosp_capable", 0644, hdev->debugfs, data,
449-
&aosp_capable_fops);
450-
451-
debugfs_create_file("force_devcoredump", 0644, hdev->debugfs, data,
452-
&force_devcoredump_fops);
459+
if (!IS_ERR_OR_NULL(hdev->debugfs))
460+
vhci_debugfs_init(data);
453461

454462
hci_skb_pkt_type(skb) = HCI_VENDOR_PKT;
455463

@@ -651,6 +659,21 @@ static int vhci_open(struct inode *inode, struct file *file)
651659
return 0;
652660
}
653661

662+
static void vhci_debugfs_remove(struct hci_dev *hdev)
663+
{
664+
debugfs_lookup_and_remove("force_suspend", hdev->debugfs);
665+
666+
debugfs_lookup_and_remove("force_wakeup", hdev->debugfs);
667+
668+
if (IS_ENABLED(CONFIG_BT_MSFTEXT))
669+
debugfs_lookup_and_remove("msft_opcode", hdev->debugfs);
670+
671+
if (IS_ENABLED(CONFIG_BT_AOSPEXT))
672+
debugfs_lookup_and_remove("aosp_capable", hdev->debugfs);
673+
674+
debugfs_lookup_and_remove("force_devcoredump", hdev->debugfs);
675+
}
676+
654677
static int vhci_release(struct inode *inode, struct file *file)
655678
{
656679
struct vhci_data *data = file->private_data;
@@ -662,6 +685,8 @@ static int vhci_release(struct inode *inode, struct file *file)
662685
hdev = data->hdev;
663686

664687
if (hdev) {
688+
if (!IS_ERR_OR_NULL(hdev->debugfs))
689+
vhci_debugfs_remove(hdev);
665690
hci_unregister_dev(hdev);
666691
hci_free_dev(hdev);
667692
}

drivers/isdn/mISDN/dsp_hwec.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,14 +51,14 @@ void dsp_hwec_enable(struct dsp *dsp, const char *arg)
5151
goto _do;
5252

5353
{
54-
char *dup, *tok, *name, *val;
54+
char *dup, *next, *tok, *name, *val;
5555
int tmp;
5656

57-
dup = kstrdup(arg, GFP_ATOMIC);
57+
dup = next = kstrdup(arg, GFP_ATOMIC);
5858
if (!dup)
5959
return;
6060

61-
while ((tok = strsep(&dup, ","))) {
61+
while ((tok = strsep(&next, ","))) {
6262
if (!strlen(tok))
6363
continue;
6464
name = strsep(&tok, "=");

drivers/net/dsa/mv88e6xxx/leds.c

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -779,7 +779,8 @@ int mv88e6xxx_port_setup_leds(struct mv88e6xxx_chip *chip, int port)
779779
continue;
780780
if (led_num > 1) {
781781
dev_err(dev, "invalid LED specified port %d\n", port);
782-
return -EINVAL;
782+
ret = -EINVAL;
783+
goto err_put_led;
783784
}
784785

785786
if (led_num == 0)
@@ -823,17 +824,25 @@ int mv88e6xxx_port_setup_leds(struct mv88e6xxx_chip *chip, int port)
823824
init_data.devname_mandatory = true;
824825
init_data.devicename = kasprintf(GFP_KERNEL, "%s:0%d:0%d", chip->info->name,
825826
port, led_num);
826-
if (!init_data.devicename)
827-
return -ENOMEM;
827+
if (!init_data.devicename) {
828+
ret = -ENOMEM;
829+
goto err_put_led;
830+
}
828831

829832
ret = devm_led_classdev_register_ext(dev, l, &init_data);
830833
kfree(init_data.devicename);
831834

832835
if (ret) {
833836
dev_err(dev, "Failed to init LED %d for port %d", led_num, port);
834-
return ret;
837+
goto err_put_led;
835838
}
836839
}
837840

841+
fwnode_handle_put(leds);
838842
return 0;
843+
844+
err_put_led:
845+
fwnode_handle_put(led);
846+
fwnode_handle_put(leds);
847+
return ret;
839848
}

drivers/net/ethernet/broadcom/bnxt/bnxt.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4397,7 +4397,7 @@ static void bnxt_alloc_one_rx_ring_netmem(struct bnxt *bp,
43974397
for (i = 0; i < bp->rx_agg_ring_size; i++) {
43984398
if (bnxt_alloc_rx_netmem(bp, rxr, prod, GFP_KERNEL)) {
43994399
netdev_warn(bp->dev, "init'ed rx ring %d with %d/%d pages only\n",
4400-
ring_nr, i, bp->rx_ring_size);
4400+
ring_nr, i, bp->rx_agg_ring_size);
44014401
break;
44024402
}
44034403
prod = NEXT_RX_AGG(prod);

drivers/net/ethernet/cadence/macb_main.c

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1223,12 +1223,13 @@ static int macb_tx_complete(struct macb_queue *queue, int budget)
12231223
{
12241224
struct macb *bp = queue->bp;
12251225
u16 queue_index = queue - bp->queues;
1226+
unsigned long flags;
12261227
unsigned int tail;
12271228
unsigned int head;
12281229
int packets = 0;
12291230
u32 bytes = 0;
12301231

1231-
spin_lock(&queue->tx_ptr_lock);
1232+
spin_lock_irqsave(&queue->tx_ptr_lock, flags);
12321233
head = queue->tx_head;
12331234
for (tail = queue->tx_tail; tail != head && packets < budget; tail++) {
12341235
struct macb_tx_skb *tx_skb;
@@ -1291,7 +1292,7 @@ static int macb_tx_complete(struct macb_queue *queue, int budget)
12911292
CIRC_CNT(queue->tx_head, queue->tx_tail,
12921293
bp->tx_ring_size) <= MACB_TX_WAKEUP_THRESH(bp))
12931294
netif_wake_subqueue(bp->dev, queue_index);
1294-
spin_unlock(&queue->tx_ptr_lock);
1295+
spin_unlock_irqrestore(&queue->tx_ptr_lock, flags);
12951296

12961297
return packets;
12971298
}
@@ -1707,8 +1708,9 @@ static void macb_tx_restart(struct macb_queue *queue)
17071708
{
17081709
struct macb *bp = queue->bp;
17091710
unsigned int head_idx, tbqp;
1711+
unsigned long flags;
17101712

1711-
spin_lock(&queue->tx_ptr_lock);
1713+
spin_lock_irqsave(&queue->tx_ptr_lock, flags);
17121714

17131715
if (queue->tx_head == queue->tx_tail)
17141716
goto out_tx_ptr_unlock;
@@ -1720,27 +1722,28 @@ static void macb_tx_restart(struct macb_queue *queue)
17201722
if (tbqp == head_idx)
17211723
goto out_tx_ptr_unlock;
17221724

1723-
spin_lock_irq(&bp->lock);
1725+
spin_lock(&bp->lock);
17241726
macb_writel(bp, NCR, macb_readl(bp, NCR) | MACB_BIT(TSTART));
1725-
spin_unlock_irq(&bp->lock);
1727+
spin_unlock(&bp->lock);
17261728

17271729
out_tx_ptr_unlock:
1728-
spin_unlock(&queue->tx_ptr_lock);
1730+
spin_unlock_irqrestore(&queue->tx_ptr_lock, flags);
17291731
}
17301732

17311733
static bool macb_tx_complete_pending(struct macb_queue *queue)
17321734
{
17331735
bool retval = false;
1736+
unsigned long flags;
17341737

1735-
spin_lock(&queue->tx_ptr_lock);
1738+
spin_lock_irqsave(&queue->tx_ptr_lock, flags);
17361739
if (queue->tx_head != queue->tx_tail) {
17371740
/* Make hw descriptor updates visible to CPU */
17381741
rmb();
17391742

17401743
if (macb_tx_desc(queue, queue->tx_tail)->ctrl & MACB_BIT(TX_USED))
17411744
retval = true;
17421745
}
1743-
spin_unlock(&queue->tx_ptr_lock);
1746+
spin_unlock_irqrestore(&queue->tx_ptr_lock, flags);
17441747
return retval;
17451748
}
17461749

@@ -2308,6 +2311,7 @@ static netdev_tx_t macb_start_xmit(struct sk_buff *skb, struct net_device *dev)
23082311
struct macb_queue *queue = &bp->queues[queue_index];
23092312
unsigned int desc_cnt, nr_frags, frag_size, f;
23102313
unsigned int hdrlen;
2314+
unsigned long flags;
23112315
bool is_lso;
23122316
netdev_tx_t ret = NETDEV_TX_OK;
23132317

@@ -2368,7 +2372,7 @@ static netdev_tx_t macb_start_xmit(struct sk_buff *skb, struct net_device *dev)
23682372
desc_cnt += DIV_ROUND_UP(frag_size, bp->max_tx_length);
23692373
}
23702374

2371-
spin_lock_bh(&queue->tx_ptr_lock);
2375+
spin_lock_irqsave(&queue->tx_ptr_lock, flags);
23722376

23732377
/* This is a hard error, log it. */
23742378
if (CIRC_SPACE(queue->tx_head, queue->tx_tail,
@@ -2392,15 +2396,15 @@ static netdev_tx_t macb_start_xmit(struct sk_buff *skb, struct net_device *dev)
23922396
netdev_tx_sent_queue(netdev_get_tx_queue(bp->dev, queue_index),
23932397
skb->len);
23942398

2395-
spin_lock_irq(&bp->lock);
2399+
spin_lock(&bp->lock);
23962400
macb_writel(bp, NCR, macb_readl(bp, NCR) | MACB_BIT(TSTART));
2397-
spin_unlock_irq(&bp->lock);
2401+
spin_unlock(&bp->lock);
23982402

23992403
if (CIRC_SPACE(queue->tx_head, queue->tx_tail, bp->tx_ring_size) < 1)
24002404
netif_stop_subqueue(dev, queue_index);
24012405

24022406
unlock:
2403-
spin_unlock_bh(&queue->tx_ptr_lock);
2407+
spin_unlock_irqrestore(&queue->tx_ptr_lock, flags);
24042408

24052409
return ret;
24062410
}

drivers/net/ethernet/cavium/thunder/thunder_bgx.c

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1493,13 +1493,17 @@ static int bgx_init_of_phy(struct bgx *bgx)
14931493
* this cortina phy, for which there is no driver
14941494
* support, ignore it.
14951495
*/
1496-
if (phy_np &&
1497-
!of_device_is_compatible(phy_np, "cortina,cs4223-slice")) {
1498-
/* Wait until the phy drivers are available */
1499-
pd = of_phy_find_device(phy_np);
1500-
if (!pd)
1501-
goto defer;
1502-
bgx->lmac[lmac].phydev = pd;
1496+
if (phy_np) {
1497+
if (!of_device_is_compatible(phy_np, "cortina,cs4223-slice")) {
1498+
/* Wait until the phy drivers are available */
1499+
pd = of_phy_find_device(phy_np);
1500+
if (!pd) {
1501+
of_node_put(phy_np);
1502+
goto defer;
1503+
}
1504+
bgx->lmac[lmac].phydev = pd;
1505+
}
1506+
of_node_put(phy_np);
15031507
}
15041508

15051509
lmac++;
@@ -1515,11 +1519,11 @@ static int bgx_init_of_phy(struct bgx *bgx)
15151519
* for phy devices we may have already found.
15161520
*/
15171521
while (lmac) {
1522+
lmac--;
15181523
if (bgx->lmac[lmac].phydev) {
15191524
put_device(&bgx->lmac[lmac].phydev->mdio.dev);
15201525
bgx->lmac[lmac].phydev = NULL;
15211526
}
1522-
lmac--;
15231527
}
15241528
of_node_put(node);
15251529
return -EPROBE_DEFER;

0 commit comments

Comments
 (0)