Skip to content

Commit c17cda1

Browse files
committed
Merge tag 'net-6.6-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
Pull networking fixes from Paolo Abeni: "Including fixes from WiFi and netfilter. Most regressions addressed here come from quite old versions, with the exceptions of the iavf one and the WiFi fixes. No known outstanding reports or investigation. Fixes to fixes: - eth: iavf: in iavf_down, disable queues when removing the driver Previous releases - regressions: - sched: act_ct: additional checks for outdated flows - tcp: do not leave an empty skb in write queue - tcp: fix wrong RTO timeout when received SACK reneging - wifi: cfg80211: pass correct pointer to rdev_inform_bss() - eth: i40e: sync next_to_clean and next_to_process for programming status desc - eth: iavf: initialize waitqueues before starting watchdog_task Previous releases - always broken: - eth: r8169: fix data-races - eth: igb: fix potential memory leak in igb_add_ethtool_nfc_entry - eth: r8152: avoid writing garbage to the adapter's registers - eth: gtp: fix fragmentation needed check with gso" * tag 'net-6.6-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (43 commits) iavf: in iavf_down, disable queues when removing the driver vsock/virtio: initialize the_virtio_vsock before using VQs net: ipv6: fix typo in comments net: ipv4: fix typo in comments net/sched: act_ct: additional checks for outdated flows netfilter: flowtable: GC pushes back packets to classic path i40e: Fix wrong check for I40E_TXR_FLAGS_WB_ON_ITR gtp: fix fragmentation needed check with gso gtp: uapi: fix GTPA_MAX Fix NULL pointer dereference in cn_filter() sfc: cleanup and reduce netlink error messages net/handshake: fix file ref count in handshake_nl_accept_doit() wifi: mac80211: don't drop all unprotected public action frames wifi: cfg80211: fix assoc response warning on failed links wifi: cfg80211: pass correct pointer to rdev_inform_bss() isdn: mISDN: hfcsusb: Spelling fix in comment tcp: fix wrong RTO timeout when received SACK reneging r8152: Block future register access if register access fails r8152: Rename RTL8152_UNPLUG to RTL8152_INACCESSIBLE r8152: Check for unplug in r8153b_ups_en() / r8153c_ups_en() ...
2 parents 611da07 + 5379866 commit c17cda1

File tree

34 files changed

+458
-214
lines changed

34 files changed

+458
-214
lines changed

drivers/connector/cn_proc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ static int cn_filter(struct sock *dsk, struct sk_buff *skb, void *data)
5454
enum proc_cn_mcast_op mc_op;
5555
uintptr_t val;
5656

57-
if (!dsk || !data)
57+
if (!dsk || !dsk->sk_user_data || !data)
5858
return 0;
5959

6060
ptr = (__u32 *)data;

drivers/isdn/hardware/mISDN/hfcsusb.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -678,7 +678,7 @@ ph_state(struct dchannel *dch)
678678
}
679679

680680
/*
681-
* disable/enable BChannel for desired protocoll
681+
* disable/enable BChannel for desired protocol
682682
*/
683683
static int
684684
hfcsusb_setup_bch(struct bchannel *bch, int protocol)

drivers/net/ethernet/adi/adin1110.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@ static int adin1110_read_fifo(struct adin1110_port_priv *port_priv)
294294
{
295295
struct adin1110_priv *priv = port_priv->priv;
296296
u32 header_len = ADIN1110_RD_HEADER_LEN;
297-
struct spi_transfer t;
297+
struct spi_transfer t = {0};
298298
u32 frame_size_no_fcs;
299299
struct sk_buff *rxb;
300300
u32 frame_size;

drivers/net/ethernet/apm/xgene/xgene_enet_main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2170,7 +2170,7 @@ static void xgene_enet_shutdown(struct platform_device *pdev)
21702170
static struct platform_driver xgene_enet_driver = {
21712171
.driver = {
21722172
.name = "xgene-enet",
2173-
.of_match_table = of_match_ptr(xgene_enet_of_match),
2173+
.of_match_table = xgene_enet_of_match,
21742174
.acpi_match_table = ACPI_PTR(xgene_enet_acpi_match),
21752175
},
21762176
.probe = xgene_enet_probe,

drivers/net/ethernet/chelsio/cxgb4/t4_hw.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3816,6 +3816,8 @@ int t4_load_phy_fw(struct adapter *adap, int win,
38163816
FW_PARAMS_PARAM_Z_V(FW_PARAMS_PARAM_DEV_PHYFW_DOWNLOAD));
38173817
ret = t4_set_params_timeout(adap, adap->mbox, adap->pf, 0, 1,
38183818
&param, &val, 30000);
3819+
if (ret)
3820+
return ret;
38193821

38203822
/* If we have version number support, then check to see that the new
38213823
* firmware got loaded properly.

drivers/net/ethernet/intel/i40e/i40e.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -580,7 +580,6 @@ struct i40e_pf {
580580
#define I40E_FLAG_DISABLE_FW_LLDP BIT(24)
581581
#define I40E_FLAG_RS_FEC BIT(25)
582582
#define I40E_FLAG_BASE_R_FEC BIT(26)
583-
#define I40E_FLAG_VF_VLAN_PRUNING BIT(27)
584583
/* TOTAL_PORT_SHUTDOWN
585584
* Allows to physically disable the link on the NIC's port.
586585
* If enabled, (after link down request from the OS)
@@ -603,6 +602,7 @@ struct i40e_pf {
603602
* in abilities field of i40e_aq_set_phy_config structure
604603
*/
605604
#define I40E_FLAG_TOTAL_PORT_SHUTDOWN_ENABLED BIT(27)
605+
#define I40E_FLAG_VF_VLAN_PRUNING BIT(28)
606606

607607
struct i40e_client_instance *cinst;
608608
bool stat_offsets_loaded;

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

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2544,7 +2544,14 @@ static int i40e_clean_rx_irq(struct i40e_ring *rx_ring, int budget,
25442544
rx_buffer = i40e_rx_bi(rx_ring, ntp);
25452545
i40e_inc_ntp(rx_ring);
25462546
i40e_reuse_rx_page(rx_ring, rx_buffer);
2547-
cleaned_count++;
2547+
/* Update ntc and bump cleaned count if not in the
2548+
* middle of mb packet.
2549+
*/
2550+
if (rx_ring->next_to_clean == ntp) {
2551+
rx_ring->next_to_clean =
2552+
rx_ring->next_to_process;
2553+
cleaned_count++;
2554+
}
25482555
continue;
25492556
}
25502557

@@ -2847,7 +2854,7 @@ int i40e_napi_poll(struct napi_struct *napi, int budget)
28472854
return budget;
28482855
}
28492856

2850-
if (vsi->back->flags & I40E_TXR_FLAGS_WB_ON_ITR)
2857+
if (q_vector->tx.ring[0].flags & I40E_TXR_FLAGS_WB_ON_ITR)
28512858
q_vector->arm_wb_state = false;
28522859

28532860
/* Exit the polling mode, but don't re-enable interrupts if stack might

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

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -437,12 +437,12 @@ int i40e_clean_rx_irq_zc(struct i40e_ring *rx_ring, int budget)
437437
unsigned int total_rx_bytes = 0, total_rx_packets = 0;
438438
u16 next_to_process = rx_ring->next_to_process;
439439
u16 next_to_clean = rx_ring->next_to_clean;
440-
u16 count_mask = rx_ring->count - 1;
441440
unsigned int xdp_res, xdp_xmit = 0;
442441
struct xdp_buff *first = NULL;
442+
u32 count = rx_ring->count;
443443
struct bpf_prog *xdp_prog;
444+
u32 entries_to_alloc;
444445
bool failure = false;
445-
u16 cleaned_count;
446446

447447
if (next_to_process != next_to_clean)
448448
first = *i40e_rx_bi(rx_ring, next_to_clean);
@@ -475,7 +475,8 @@ int i40e_clean_rx_irq_zc(struct i40e_ring *rx_ring, int budget)
475475
qword);
476476
bi = *i40e_rx_bi(rx_ring, next_to_process);
477477
xsk_buff_free(bi);
478-
next_to_process = (next_to_process + 1) & count_mask;
478+
if (++next_to_process == count)
479+
next_to_process = 0;
479480
continue;
480481
}
481482

@@ -493,7 +494,8 @@ int i40e_clean_rx_irq_zc(struct i40e_ring *rx_ring, int budget)
493494
else if (i40e_add_xsk_frag(rx_ring, first, bi, size))
494495
break;
495496

496-
next_to_process = (next_to_process + 1) & count_mask;
497+
if (++next_to_process == count)
498+
next_to_process = 0;
497499

498500
if (i40e_is_non_eop(rx_ring, rx_desc))
499501
continue;
@@ -513,10 +515,10 @@ int i40e_clean_rx_irq_zc(struct i40e_ring *rx_ring, int budget)
513515

514516
rx_ring->next_to_clean = next_to_clean;
515517
rx_ring->next_to_process = next_to_process;
516-
cleaned_count = (next_to_clean - rx_ring->next_to_use - 1) & count_mask;
517518

518-
if (cleaned_count >= I40E_RX_BUFFER_WRITE)
519-
failure |= !i40e_alloc_rx_buffers_zc(rx_ring, cleaned_count);
519+
entries_to_alloc = I40E_DESC_UNUSED(rx_ring);
520+
if (entries_to_alloc >= I40E_RX_BUFFER_WRITE)
521+
failure |= !i40e_alloc_rx_buffers_zc(rx_ring, entries_to_alloc);
520522

521523
i40e_finalize_xdp_rx(rx_ring, xdp_xmit);
522524
i40e_update_rx_stats(rx_ring, total_rx_bytes, total_rx_packets);
@@ -752,14 +754,16 @@ int i40e_xsk_wakeup(struct net_device *dev, u32 queue_id, u32 flags)
752754

753755
void i40e_xsk_clean_rx_ring(struct i40e_ring *rx_ring)
754756
{
755-
u16 count_mask = rx_ring->count - 1;
756757
u16 ntc = rx_ring->next_to_clean;
757758
u16 ntu = rx_ring->next_to_use;
758759

759-
for ( ; ntc != ntu; ntc = (ntc + 1) & count_mask) {
760+
while (ntc != ntu) {
760761
struct xdp_buff *rx_bi = *i40e_rx_bi(rx_ring, ntc);
761762

762763
xsk_buff_free(rx_bi);
764+
ntc++;
765+
if (ntc >= rx_ring->count)
766+
ntc = 0;
763767
}
764768
}
765769

drivers/net/ethernet/intel/iavf/iavf_main.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1437,9 +1437,9 @@ void iavf_down(struct iavf_adapter *adapter)
14371437
adapter->aq_required |= IAVF_FLAG_AQ_DEL_FDIR_FILTER;
14381438
if (!list_empty(&adapter->adv_rss_list_head))
14391439
adapter->aq_required |= IAVF_FLAG_AQ_DEL_ADV_RSS_CFG;
1440-
adapter->aq_required |= IAVF_FLAG_AQ_DISABLE_QUEUES;
14411440
}
14421441

1442+
adapter->aq_required |= IAVF_FLAG_AQ_DISABLE_QUEUES;
14431443
mod_delayed_work(adapter->wq, &adapter->watchdog_task, 0);
14441444
}
14451445

@@ -4982,8 +4982,6 @@ static int iavf_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
49824982
INIT_WORK(&adapter->finish_config, iavf_finish_config);
49834983
INIT_DELAYED_WORK(&adapter->watchdog_task, iavf_watchdog_task);
49844984
INIT_DELAYED_WORK(&adapter->client_task, iavf_client_task);
4985-
queue_delayed_work(adapter->wq, &adapter->watchdog_task,
4986-
msecs_to_jiffies(5 * (pdev->devfn & 0x07)));
49874985

49884986
/* Setup the wait queue for indicating transition to down status */
49894987
init_waitqueue_head(&adapter->down_waitqueue);
@@ -4994,6 +4992,9 @@ static int iavf_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
49944992
/* Setup the wait queue for indicating virtchannel events */
49954993
init_waitqueue_head(&adapter->vc_waitqueue);
49964994

4995+
queue_delayed_work(adapter->wq, &adapter->watchdog_task,
4996+
msecs_to_jiffies(5 * (pdev->devfn & 0x07)));
4997+
/* Initialization goes on in the work. Do not add more of it below. */
49974998
return 0;
49984999

49995000
err_ioremap:

drivers/net/ethernet/intel/igb/igb_ethtool.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2978,11 +2978,15 @@ static int igb_add_ethtool_nfc_entry(struct igb_adapter *adapter,
29782978
if (err)
29792979
goto err_out_w_lock;
29802980

2981-
igb_update_ethtool_nfc_entry(adapter, input, input->sw_idx);
2981+
err = igb_update_ethtool_nfc_entry(adapter, input, input->sw_idx);
2982+
if (err)
2983+
goto err_out_input_filter;
29822984

29832985
spin_unlock(&adapter->nfc_lock);
29842986
return 0;
29852987

2988+
err_out_input_filter:
2989+
igb_erase_filter(adapter, input);
29862990
err_out_w_lock:
29872991
spin_unlock(&adapter->nfc_lock);
29882992
err_out:

0 commit comments

Comments
 (0)