Skip to content

Commit df47935

Browse files
committed
Merge tag 'net-6.8-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
Pull networking fixes from Paolo Abeni: "Including fixes from bpf, ipsec and netfilter. No solution yet for the stmmac issue mentioned in the last PR, but it proved to be a lockdep false positive, not a blocker. Current release - regressions: - dpll: move all dpll<>netdev helpers to dpll code, fix build regression with old compilers Current release - new code bugs: - page_pool: fix netlink dump stop/resume Previous releases - regressions: - bpf: fix verifier to check bpf_func_state->callback_depth when pruning states as otherwise unsafe programs could get accepted - ipv6: avoid possible UAF in ip6_route_mpath_notify() - ice: reconfig host after changing MSI-X on VF - mlx5: - e-switch, change flow rule destination checking - add a memory barrier to prevent a possible null-ptr-deref - switch to using _bh variant of of spinlock where needed Previous releases - always broken: - netfilter: nf_conntrack_h323: add protection for bmp length out of range - bpf: fix to zero-initialise xdp_rxq_info struct before running XDP program in CPU map which led to random xdp_md fields - xfrm: fix UDP encapsulation in TX packet offload - netrom: fix data-races around sysctls - ice: - fix potential NULL pointer dereference in ice_bridge_setlink() - fix uninitialized dplls mutex usage - igc: avoid returning frame twice in XDP_REDIRECT - i40e: disable NAPI right after disabling irqs when handling xsk_pool - geneve: make sure to pull inner header in geneve_rx() - sparx5: fix use after free inside sparx5_del_mact_entry - dsa: microchip: fix register write order in ksz8_ind_write8() Misc: - selftests: mptcp: fixes for diag.sh" * tag 'net-6.8-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (63 commits) net: pds_core: Fix possible double free in error handling path netrom: Fix data-races around sysctl_net_busy_read netrom: Fix a data-race around sysctl_netrom_link_fails_count netrom: Fix a data-race around sysctl_netrom_routing_control netrom: Fix a data-race around sysctl_netrom_transport_no_activity_timeout netrom: Fix a data-race around sysctl_netrom_transport_requested_window_size netrom: Fix a data-race around sysctl_netrom_transport_busy_delay netrom: Fix a data-race around sysctl_netrom_transport_acknowledge_delay netrom: Fix a data-race around sysctl_netrom_transport_maximum_tries netrom: Fix a data-race around sysctl_netrom_transport_timeout netrom: Fix data-races around sysctl_netrom_network_ttl_initialiser netrom: Fix a data-race around sysctl_netrom_obsolescence_count_initialiser netrom: Fix a data-race around sysctl_netrom_default_path_quality netfilter: nf_conntrack_h323: Add protection for bmp length out of range netfilter: nf_tables: mark set as dead when unbinding anonymous set with timeout netfilter: nft_ct: fix l3num expectations with inet pseudo family netfilter: nf_tables: reject constant set with timeout netfilter: nf_tables: disallow anonymous set with timeout flag net/rds: fix WARNING in rds_conn_connect_if_down net: dsa: microchip: fix register write order in ksz8_ind_write8() ...
2 parents 67be068 + ba18ded commit df47935

64 files changed

Lines changed: 443 additions & 270 deletions

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/renesas,ethertsn.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,11 @@ properties:
6565

6666
rx-internal-delay-ps:
6767
enum: [0, 1800]
68+
default: 0
6869

6970
tx-internal-delay-ps:
7071
enum: [0, 2000]
72+
default: 0
7173

7274
'#address-cells':
7375
const: 1

Documentation/driver-api/dpll.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -545,7 +545,7 @@ In such scenario, dpll device input signal shall be also configurable
545545
to drive dpll with signal recovered from the PHY netdevice.
546546
This is done by exposing a pin to the netdevice - attaching pin to the
547547
netdevice itself with
548-
``netdev_dpll_pin_set(struct net_device *dev, struct dpll_pin *dpll_pin)``.
548+
``dpll_netdev_pin_set(struct net_device *dev, struct dpll_pin *dpll_pin)``.
549549
Exposed pin id handle ``DPLL_A_PIN_ID`` is then identifiable by the user
550550
as it is attached to rtnetlink respond to get ``RTM_NEWLINK`` command in
551551
nested attribute ``IFLA_DPLL_PIN``.

MAINTAINERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20207,8 +20207,8 @@ F: Documentation/devicetree/bindings/net/socionext,uniphier-ave4.yaml
2020720207
F: drivers/net/ethernet/socionext/sni_ave.c
2020820208

2020920209
SOCIONEXT (SNI) NETSEC NETWORK DRIVER
20210-
M: Jassi Brar <jaswinder.singh@linaro.org>
2021120210
M: Ilias Apalodimas <ilias.apalodimas@linaro.org>
20211+
M: Masahisa Kojima <kojima.masahisa@socionext.com>
2021220212
L: netdev@vger.kernel.org
2021320213
S: Maintained
2021420214
F: Documentation/devicetree/bindings/net/socionext,synquacer-netsec.yaml

drivers/dpll/dpll_core.c

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,6 @@ struct dpll_pin_registration {
4242
void *priv;
4343
};
4444

45-
struct dpll_pin *netdev_dpll_pin(const struct net_device *dev)
46-
{
47-
return rcu_dereference_rtnl(dev->dpll_pin);
48-
}
49-
5045
struct dpll_device *dpll_device_get_by_id(int id)
5146
{
5247
if (xa_get_mark(&dpll_device_xa, id, DPLL_REGISTERED))
@@ -513,6 +508,26 @@ dpll_pin_alloc(u64 clock_id, u32 pin_idx, struct module *module,
513508
return ERR_PTR(ret);
514509
}
515510

511+
static void dpll_netdev_pin_assign(struct net_device *dev, struct dpll_pin *dpll_pin)
512+
{
513+
rtnl_lock();
514+
rcu_assign_pointer(dev->dpll_pin, dpll_pin);
515+
rtnl_unlock();
516+
}
517+
518+
void dpll_netdev_pin_set(struct net_device *dev, struct dpll_pin *dpll_pin)
519+
{
520+
WARN_ON(!dpll_pin);
521+
dpll_netdev_pin_assign(dev, dpll_pin);
522+
}
523+
EXPORT_SYMBOL(dpll_netdev_pin_set);
524+
525+
void dpll_netdev_pin_clear(struct net_device *dev)
526+
{
527+
dpll_netdev_pin_assign(dev, NULL);
528+
}
529+
EXPORT_SYMBOL(dpll_netdev_pin_clear);
530+
516531
/**
517532
* dpll_pin_get - find existing or create new dpll pin
518533
* @clock_id: clock_id of creator

drivers/dpll/dpll_netlink.c

Lines changed: 24 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
*/
99
#include <linux/module.h>
1010
#include <linux/kernel.h>
11+
#include <linux/netdevice.h>
1112
#include <net/genetlink.h>
1213
#include "dpll_core.h"
1314
#include "dpll_netlink.h"
@@ -47,18 +48,6 @@ dpll_msg_add_dev_parent_handle(struct sk_buff *msg, u32 id)
4748
return 0;
4849
}
4950

50-
/**
51-
* dpll_msg_pin_handle_size - get size of pin handle attribute for given pin
52-
* @pin: pin pointer
53-
*
54-
* Return: byte size of pin handle attribute for given pin.
55-
*/
56-
size_t dpll_msg_pin_handle_size(struct dpll_pin *pin)
57-
{
58-
return pin ? nla_total_size(4) : 0; /* DPLL_A_PIN_ID */
59-
}
60-
EXPORT_SYMBOL_GPL(dpll_msg_pin_handle_size);
61-
6251
/**
6352
* dpll_msg_add_pin_handle - attach pin handle attribute to a given message
6453
* @msg: pointer to sk_buff message to attach a pin handle
@@ -68,15 +57,36 @@ EXPORT_SYMBOL_GPL(dpll_msg_pin_handle_size);
6857
* * 0 - success
6958
* * -EMSGSIZE - no space in message to attach pin handle
7059
*/
71-
int dpll_msg_add_pin_handle(struct sk_buff *msg, struct dpll_pin *pin)
60+
static int dpll_msg_add_pin_handle(struct sk_buff *msg, struct dpll_pin *pin)
7261
{
7362
if (!pin)
7463
return 0;
7564
if (nla_put_u32(msg, DPLL_A_PIN_ID, pin->id))
7665
return -EMSGSIZE;
7766
return 0;
7867
}
79-
EXPORT_SYMBOL_GPL(dpll_msg_add_pin_handle);
68+
69+
static struct dpll_pin *dpll_netdev_pin(const struct net_device *dev)
70+
{
71+
return rcu_dereference_rtnl(dev->dpll_pin);
72+
}
73+
74+
/**
75+
* dpll_netdev_pin_handle_size - get size of pin handle attribute of a netdev
76+
* @dev: netdev from which to get the pin
77+
*
78+
* Return: byte size of pin handle attribute, or 0 if @dev has no pin.
79+
*/
80+
size_t dpll_netdev_pin_handle_size(const struct net_device *dev)
81+
{
82+
return dpll_netdev_pin(dev) ? nla_total_size(4) : 0; /* DPLL_A_PIN_ID */
83+
}
84+
85+
int dpll_netdev_add_pin_handle(struct sk_buff *msg,
86+
const struct net_device *dev)
87+
{
88+
return dpll_msg_add_pin_handle(msg, dpll_netdev_pin(dev));
89+
}
8090

8191
static int
8292
dpll_msg_add_mode(struct sk_buff *msg, struct dpll_device *dpll,

drivers/net/bonding/bond_main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1811,7 +1811,7 @@ void bond_xdp_set_features(struct net_device *bond_dev)
18111811

18121812
ASSERT_RTNL();
18131813

1814-
if (!bond_xdp_check(bond)) {
1814+
if (!bond_xdp_check(bond) || !bond_has_slaves(bond)) {
18151815
xdp_clear_features_flag(bond_dev);
18161816
return;
18171817
}

drivers/net/dsa/microchip/ksz8795.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,9 @@ static int ksz8_ind_write8(struct ksz_device *dev, u8 table, u16 addr, u8 data)
4949
mutex_lock(&dev->alu_mutex);
5050

5151
ctrl_addr = IND_ACC_TABLE(table) | addr;
52-
ret = ksz_write8(dev, regs[REG_IND_BYTE], data);
52+
ret = ksz_write16(dev, regs[REG_IND_CTRL_0], ctrl_addr);
5353
if (!ret)
54-
ret = ksz_write16(dev, regs[REG_IND_CTRL_0], ctrl_addr);
54+
ret = ksz_write8(dev, regs[REG_IND_BYTE], data);
5555

5656
mutex_unlock(&dev->alu_mutex);
5757

drivers/net/ethernet/amd/pds_core/auxbus.c

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -160,23 +160,19 @@ static struct pds_auxiliary_dev *pdsc_auxbus_dev_register(struct pdsc *cf,
160160
if (err < 0) {
161161
dev_warn(cf->dev, "auxiliary_device_init of %s failed: %pe\n",
162162
name, ERR_PTR(err));
163-
goto err_out;
163+
kfree(padev);
164+
return ERR_PTR(err);
164165
}
165166

166167
err = auxiliary_device_add(aux_dev);
167168
if (err) {
168169
dev_warn(cf->dev, "auxiliary_device_add of %s failed: %pe\n",
169170
name, ERR_PTR(err));
170-
goto err_out_uninit;
171+
auxiliary_device_uninit(aux_dev);
172+
return ERR_PTR(err);
171173
}
172174

173175
return padev;
174-
175-
err_out_uninit:
176-
auxiliary_device_uninit(aux_dev);
177-
err_out:
178-
kfree(padev);
179-
return ERR_PTR(err);
180176
}
181177

182178
int pdsc_auxbus_dev_del(struct pdsc *cf, struct pdsc *pf)

drivers/net/ethernet/intel/e1000e/ich8lan.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2559,7 +2559,7 @@ void e1000_copy_rx_addrs_to_phy_ich8lan(struct e1000_hw *hw)
25592559
hw->phy.ops.write_reg_page(hw, BM_RAR_H(i),
25602560
(u16)(mac_reg & 0xFFFF));
25612561
hw->phy.ops.write_reg_page(hw, BM_RAR_CTRL(i),
2562-
FIELD_GET(E1000_RAH_AV, mac_reg));
2562+
(u16)((mac_reg & E1000_RAH_AV) >> 16));
25632563
}
25642564

25652565
e1000_disable_phy_wakeup_reg_access_bm(hw, &phy_reg);

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13560,9 +13560,9 @@ int i40e_queue_pair_disable(struct i40e_vsi *vsi, int queue_pair)
1356013560
return err;
1356113561

1356213562
i40e_queue_pair_disable_irq(vsi, queue_pair);
13563+
i40e_queue_pair_toggle_napi(vsi, queue_pair, false /* off */);
1356313564
err = i40e_queue_pair_toggle_rings(vsi, queue_pair, false /* off */);
1356413565
i40e_clean_rx_ring(vsi->rx_rings[queue_pair]);
13565-
i40e_queue_pair_toggle_napi(vsi, queue_pair, false /* off */);
1356613566
i40e_queue_pair_clean_rings(vsi, queue_pair);
1356713567
i40e_queue_pair_reset_stats(vsi, queue_pair);
1356813568

0 commit comments

Comments
 (0)