Skip to content

Commit a55f7f5

Browse files
committed
Merge tag 'net-7.0-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
Pull networking fixes from Paolo Abeni: "Including fixes from netfilter, IPsec and wireless. This is again considerably bigger than the old average. No known outstanding regressions. Current release - regressions: - net: increase IP_TUNNEL_RECURSION_LIMIT to 5 - eth: ice: fix PTP timestamping broken by SyncE code on E825C Current release - new code bugs: - eth: stmmac: dwmac-motorcomm: fix eFUSE MAC address read failure Previous releases - regressions: - core: fix cross-cache free of KFENCE-allocated skb head - sched: act_csum: validate nested VLAN headers - rxrpc: fix call removal to use RCU safe deletion - xfrm: - wait for RCU readers during policy netns exit - fix refcount leak in xfrm_migrate_policy_find - wifi: rt2x00usb: fix devres lifetime - mptcp: fix slab-use-after-free in __inet_lookup_established - ipvs: fix NULL deref in ip_vs_add_service error path - eth: - airoha: fix memory leak in airoha_qdma_rx_process() - lan966x: fix use-after-free and leak in lan966x_fdma_reload() Previous releases - always broken: - ipv6: ioam: fix potential NULL dereferences in __ioam6_fill_trace_data() - ipv4: nexthop: avoid duplicate NHA_HW_STATS_ENABLE on nexthop group dump - bridge: guard local VLAN-0 FDB helpers against NULL vlan group - xsk: tailroom reservation and MTU validation - rxrpc: - fix to request an ack if window is limited - fix RESPONSE authenticator parser OOB read - netfilter: nft_ct: fix use-after-free in timeout object destroy - batman-adv: hold claim backbone gateways by reference - eth: - stmmac: fix PTP ref clock for Tegra234 - idpf: fix PREEMPT_RT raw/bh spinlock nesting for async VC handling - ipa: fix GENERIC_CMD register field masks for IPA v5.0+" * tag 'net-7.0-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (104 commits) net: lan966x: fix use-after-free and leak in lan966x_fdma_reload() net: lan966x: fix page pool leak in error paths net: lan966x: fix page_pool error handling in lan966x_fdma_rx_alloc_page_pool() nfc: pn533: allocate rx skb before consuming bytes l2tp: Drop large packets with UDP encap net: ipa: fix event ring index not programmed for IPA v5.0+ net: ipa: fix GENERIC_CMD register field masks for IPA v5.0+ MAINTAINERS: Add Prashanth as additional maintainer for amd-xgbe driver devlink: Fix incorrect skb socket family dumping af_unix: read UNIX_DIAG_VFS data under unix_state_lock Revert "mptcp: add needs_id for netlink appending addr" mptcp: fix slab-use-after-free in __inet_lookup_established net: txgbe: leave space for null terminators on property_entry net: ioam6: fix OOB and missing lock rxrpc: proc: size address buffers for %pISpc output rxrpc: only handle RESPONSE during service challenge rxrpc: Fix buffer overread in rxgk_do_verify_authenticator() rxrpc: Fix leak of rxgk context in rxgk_verify_response() rxrpc: Fix integer overflow in rxgk_verify_response() rxrpc: Fix missing error checks for rxkad encryption/decryption failure ...
2 parents 8b02520 + b4afe3f commit a55f7f5

97 files changed

Lines changed: 1172 additions & 468 deletions

File tree

Some content is hidden

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

Documentation/devicetree/bindings/net/nvidia,tegra234-mgbe.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ properties:
4242
- const: mgbe
4343
- const: mac
4444
- const: mac-divider
45-
- const: ptp-ref
45+
- const: ptp_ref
4646
- const: rx-input-m
4747
- const: rx-input
4848
- const: tx
@@ -133,7 +133,7 @@ examples:
133133
<&bpmp TEGRA234_CLK_MGBE0_RX_PCS_M>,
134134
<&bpmp TEGRA234_CLK_MGBE0_RX_PCS>,
135135
<&bpmp TEGRA234_CLK_MGBE0_TX_PCS>;
136-
clock-names = "mgbe", "mac", "mac-divider", "ptp-ref", "rx-input-m",
136+
clock-names = "mgbe", "mac", "mac-divider", "ptp_ref", "rx-input-m",
137137
"rx-input", "tx", "eee-pcs", "rx-pcs-input", "rx-pcs-m",
138138
"rx-pcs", "tx-pcs";
139139
resets = <&bpmp TEGRA234_RESET_MGBE0_MAC>,

MAINTAINERS

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1291,6 +1291,7 @@ F: include/uapi/drm/amdxdna_accel.h
12911291

12921292
AMD XGBE DRIVER
12931293
M: Raju Rangoju <Raju.Rangoju@amd.com>
1294+
M: Prashanth Kumar K R <PrashanthKumar.K.R@amd.com>
12941295
L: netdev@vger.kernel.org
12951296
S: Maintained
12961297
F: arch/arm64/boot/dts/amd/amd-seattle-xgbe*.dtsi
@@ -21075,8 +21076,7 @@ F: include/uapi/linux/atmppp.h
2107521076
F: net/atm/pppoatm.c
2107621077

2107721078
PPP OVER ETHERNET
21078-
M: Michal Ostrowski <mostrows@earthlink.net>
21079-
S: Maintained
21079+
S: Orphan
2108021080
F: drivers/net/ppp/pppoe.c
2108121081
F: drivers/net/ppp/pppox.c
2108221082

@@ -22130,7 +22130,7 @@ S: Supported
2213022130
F: drivers/infiniband/sw/rdmavt
2213122131

2213222132
RDS - RELIABLE DATAGRAM SOCKETS
22133-
M: Allison Henderson <allison.henderson@oracle.com>
22133+
M: Allison Henderson <achender@kernel.org>
2213422134
L: netdev@vger.kernel.org
2213522135
L: linux-rdma@vger.kernel.org
2213622136
L: rds-devel@oss.oracle.com (moderated for non-subscribers)

drivers/net/ethernet/airoha/airoha_eth.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -697,9 +697,8 @@ static int airoha_qdma_rx_process(struct airoha_queue *q, int budget)
697697
if (q->skb) {
698698
dev_kfree_skb(q->skb);
699699
q->skb = NULL;
700-
} else {
701-
page_pool_put_full_page(q->page_pool, page, true);
702700
}
701+
page_pool_put_full_page(q->page_pool, page, true);
703702
}
704703
airoha_qdma_fill_rx_queue(q);
705704

drivers/net/ethernet/altera/altera_tse_main.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -570,6 +570,7 @@ static netdev_tx_t tse_start_xmit(struct sk_buff *skb, struct net_device *dev)
570570
DMA_TO_DEVICE);
571571
if (dma_mapping_error(priv->device, dma_addr)) {
572572
netdev_err(priv->dev, "%s: DMA mapping error\n", __func__);
573+
dev_kfree_skb_any(skb);
573574
ret = NETDEV_TX_OK;
574575
goto out;
575576
}

drivers/net/ethernet/freescale/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ config FEC
2828
depends on PTP_1588_CLOCK_OPTIONAL
2929
select CRC32
3030
select PHYLIB
31-
select FIXED_PHY if M5272
31+
select FIXED_PHY
3232
select PAGE_POOL
3333
imply PAGE_POOL_STATS
3434
imply NET_SELFTESTS

drivers/net/ethernet/intel/e1000/e1000_ethtool.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -496,14 +496,19 @@ static int e1000_set_eeprom(struct net_device *netdev,
496496
*/
497497
ret_val = e1000_read_eeprom(hw, first_word, 1,
498498
&eeprom_buff[0]);
499+
if (ret_val)
500+
goto out;
501+
499502
ptr++;
500503
}
501-
if (((eeprom->offset + eeprom->len) & 1) && (ret_val == 0)) {
504+
if ((eeprom->offset + eeprom->len) & 1) {
502505
/* need read/modify/write of last changed EEPROM word
503506
* only the first byte of the word is being modified
504507
*/
505508
ret_val = e1000_read_eeprom(hw, last_word, 1,
506509
&eeprom_buff[last_word - first_word]);
510+
if (ret_val)
511+
goto out;
507512
}
508513

509514
/* Device's eeprom is always little-endian, word addressable */
@@ -522,6 +527,7 @@ static int e1000_set_eeprom(struct net_device *netdev,
522527
if ((ret_val == 0) && (first_word <= EEPROM_CHECKSUM_REG))
523528
e1000_update_eeprom_checksum(hw);
524529

530+
out:
525531
kfree(eeprom_buff);
526532
return ret_val;
527533
}

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

Lines changed: 19 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1296,12 +1296,10 @@ void ice_ptp_link_change(struct ice_pf *pf, bool linkup)
12961296
if (pf->hw.reset_ongoing)
12971297
return;
12981298

1299-
if (hw->mac_type == ICE_MAC_GENERIC_3K_E825) {
1299+
if (hw->mac_type == ICE_MAC_GENERIC_3K_E825 &&
1300+
test_bit(ICE_FLAG_DPLL, pf->flags)) {
13001301
int pin, err;
13011302

1302-
if (!test_bit(ICE_FLAG_DPLL, pf->flags))
1303-
return;
1304-
13051303
mutex_lock(&pf->dplls.lock);
13061304
for (pin = 0; pin < ICE_SYNCE_CLK_NUM; pin++) {
13071305
enum ice_synce_clk clk_pin;
@@ -1314,15 +1312,19 @@ void ice_ptp_link_change(struct ice_pf *pf, bool linkup)
13141312
port_num,
13151313
&active,
13161314
clk_pin);
1317-
if (WARN_ON_ONCE(err)) {
1318-
mutex_unlock(&pf->dplls.lock);
1319-
return;
1315+
if (err) {
1316+
dev_err_once(ice_pf_to_dev(pf),
1317+
"Failed to read SyncE bypass mux for pin %d, err %d\n",
1318+
pin, err);
1319+
break;
13201320
}
13211321

13221322
err = ice_tspll_cfg_synce_ethdiv_e825c(hw, clk_pin);
1323-
if (active && WARN_ON_ONCE(err)) {
1324-
mutex_unlock(&pf->dplls.lock);
1325-
return;
1323+
if (active && err) {
1324+
dev_err_once(ice_pf_to_dev(pf),
1325+
"Failed to configure SyncE ETH divider for pin %d, err %d\n",
1326+
pin, err);
1327+
break;
13261328
}
13271329
}
13281330
mutex_unlock(&pf->dplls.lock);
@@ -3080,7 +3082,13 @@ static int ice_ptp_setup_pf(struct ice_pf *pf)
30803082
struct ice_ptp *ctrl_ptp = ice_get_ctrl_ptp(pf);
30813083
struct ice_ptp *ptp = &pf->ptp;
30823084

3083-
if (WARN_ON(!ctrl_ptp) || pf->hw.mac_type == ICE_MAC_UNKNOWN)
3085+
if (!ctrl_ptp) {
3086+
dev_info(ice_pf_to_dev(pf),
3087+
"PTP unavailable: no controlling PF\n");
3088+
return -EOPNOTSUPP;
3089+
}
3090+
3091+
if (pf->hw.mac_type == ICE_MAC_UNKNOWN)
30843092
return -ENODEV;
30853093

30863094
INIT_LIST_HEAD(&ptp->port.list_node);

drivers/net/ethernet/intel/idpf/idpf_virtchnl.c

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -287,26 +287,21 @@ int idpf_send_mb_msg(struct idpf_adapter *adapter, struct idpf_ctlq_info *asq,
287287
return err;
288288
}
289289

290-
/* API for virtchnl "transaction" support ("xn" for short).
291-
*
292-
* We are reusing the completion lock to serialize the accesses to the
293-
* transaction state for simplicity, but it could be its own separate synchro
294-
* as well. For now, this API is only used from within a workqueue context;
295-
* raw_spin_lock() is enough.
296-
*/
290+
/* API for virtchnl "transaction" support ("xn" for short). */
291+
297292
/**
298293
* idpf_vc_xn_lock - Request exclusive access to vc transaction
299294
* @xn: struct idpf_vc_xn* to access
300295
*/
301296
#define idpf_vc_xn_lock(xn) \
302-
raw_spin_lock(&(xn)->completed.wait.lock)
297+
spin_lock(&(xn)->lock)
303298

304299
/**
305300
* idpf_vc_xn_unlock - Release exclusive access to vc transaction
306301
* @xn: struct idpf_vc_xn* to access
307302
*/
308303
#define idpf_vc_xn_unlock(xn) \
309-
raw_spin_unlock(&(xn)->completed.wait.lock)
304+
spin_unlock(&(xn)->lock)
310305

311306
/**
312307
* idpf_vc_xn_release_bufs - Release reference to reply buffer(s) and
@@ -338,6 +333,7 @@ static void idpf_vc_xn_init(struct idpf_vc_xn_manager *vcxn_mngr)
338333
xn->state = IDPF_VC_XN_IDLE;
339334
xn->idx = i;
340335
idpf_vc_xn_release_bufs(xn);
336+
spin_lock_init(&xn->lock);
341337
init_completion(&xn->completed);
342338
}
343339

@@ -406,7 +402,9 @@ static void idpf_vc_xn_push_free(struct idpf_vc_xn_manager *vcxn_mngr,
406402
struct idpf_vc_xn *xn)
407403
{
408404
idpf_vc_xn_release_bufs(xn);
405+
spin_lock_bh(&vcxn_mngr->xn_bm_lock);
409406
set_bit(xn->idx, vcxn_mngr->free_xn_bm);
407+
spin_unlock_bh(&vcxn_mngr->xn_bm_lock);
410408
}
411409

412410
/**
@@ -617,6 +615,10 @@ idpf_vc_xn_forward_reply(struct idpf_adapter *adapter,
617615
err = -ENXIO;
618616
goto out_unlock;
619617
case IDPF_VC_XN_ASYNC:
618+
/* Set reply_sz from the actual payload so that async_handler
619+
* can evaluate the response.
620+
*/
621+
xn->reply_sz = ctlq_msg->data_len;
620622
err = idpf_vc_xn_forward_async(adapter, xn, ctlq_msg);
621623
idpf_vc_xn_unlock(xn);
622624
return err;

drivers/net/ethernet/intel/idpf/idpf_virtchnl.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ typedef int (*async_vc_cb) (struct idpf_adapter *, struct idpf_vc_xn *,
4242
* struct idpf_vc_xn - Data structure representing virtchnl transactions
4343
* @completed: virtchnl event loop uses that to signal when a reply is
4444
* available, uses kernel completion API
45-
* @state: virtchnl event loop stores the data below, protected by the
46-
* completion's lock.
45+
* @lock: protects the transaction state fields below
46+
* @state: virtchnl event loop stores the data below, protected by @lock
4747
* @reply_sz: Original size of reply, may be > reply_buf.iov_len; it will be
4848
* truncated on its way to the receiver thread according to
4949
* reply_buf.iov_len.
@@ -58,6 +58,7 @@ typedef int (*async_vc_cb) (struct idpf_adapter *, struct idpf_vc_xn *,
5858
*/
5959
struct idpf_vc_xn {
6060
struct completion completed;
61+
spinlock_t lock;
6162
enum idpf_vc_xn_state state;
6263
size_t reply_sz;
6364
struct kvec reply;

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2203,9 +2203,8 @@ void igb_down(struct igb_adapter *adapter)
22032203

22042204
for (i = 0; i < adapter->num_q_vectors; i++) {
22052205
if (adapter->q_vector[i]) {
2206-
napi_synchronize(&adapter->q_vector[i]->napi);
2207-
igb_set_queue_napi(adapter, i, NULL);
22082206
napi_disable(&adapter->q_vector[i]->napi);
2207+
igb_set_queue_napi(adapter, i, NULL);
22092208
}
22102209
}
22112210

0 commit comments

Comments
 (0)