Skip to content

Commit 8b97cae

Browse files
committed
Merge tag 'net-5.17-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
Pull networking fixes from Jakub Kicinski: "Including fixes from wireless and netfilter. Current release - regressions: - dsa: lantiq_gswip: fix use after free in gswip_remove() - smc: avoid overwriting the copies of clcsock callback functions Current release - new code bugs: - iwlwifi: - fix use-after-free when no FW is present - mei: fix the pskb_may_pull check in ipv4 - mei: retry mapping the shared area - mvm: don't feed the hardware RFKILL into iwlmei Previous releases - regressions: - ipv6: mcast: use rcu-safe version of ipv6_get_lladdr() - tipc: fix wrong publisher node address in link publications - iwlwifi: mvm: don't send SAR GEO command for 3160 devices, avoid FW assertion - bgmac: make idm and nicpm resource optional again - atl1c: fix tx timeout after link flap Previous releases - always broken: - vsock: remove vsock from connected table when connect is interrupted by a signal - ping: change destination interface checks to match raw sockets - crypto: af_alg - get rid of alg_memory_allocated to avoid confusing semantics (and null-deref) after SO_RESERVE_MEM was added - ipv6: make exclusive flowlabel checks per-netns - bonding: force carrier update when releasing slave - sched: limit TC_ACT_REPEAT loops - bridge: multicast: notify switchdev driver whenever MC processing gets disabled because of max entries reached - wifi: brcmfmac: fix crash in brcm_alt_fw_path when WLAN not found - iwlwifi: fix locking when "HW not ready" - phy: mediatek: remove PHY mode check on MT7531 - dsa: mv88e6xxx: flush switchdev FDB workqueue before removing VLAN - dsa: lan9303: - fix polarity of reset during probe - fix accelerated VLAN handling" * tag 'net-5.17-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (65 commits) bonding: force carrier update when releasing slave nfp: flower: netdev offload check for ip6gretap ipv6: fix data-race in fib6_info_hw_flags_set / fib6_purge_rt ipv4: fix data races in fib_alias_hw_flags_set net: dsa: lan9303: add VLAN IDs to master device net: dsa: lan9303: handle hwaccel VLAN tags vsock: remove vsock from connected table when connect is interrupted by a signal Revert "net: ethernet: bgmac: Use devm_platform_ioremap_resource_byname" ping: fix the dif and sdif check in ping_lookup net: usb: cdc_mbim: avoid altsetting toggling for Telit FN990 net: sched: limit TC_ACT_REPEAT loops tipc: fix wrong notification node addresses net: dsa: lantiq_gswip: fix use after free in gswip_remove() ipv6: per-netns exclusive flowlabel checks net: bridge: multicast: notify switchdev driver whenever MC processing gets disabled CDC-NCM: avoid overflow in sanity checking mctp: fix use after free net: mscc: ocelot: fix use-after-free in ocelot_vlan_del() bonding: fix data-races around agg_select_timer dpaa2-eth: Initialize mutex used in one step timestamping path ...
2 parents a3580ac + a6ab75c commit 8b97cae

Some content is hidden

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

85 files changed

+520
-788
lines changed

MAINTAINERS

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3139,11 +3139,9 @@ W: https://wireless.wiki.kernel.org/en/users/Drivers/ath5k
31393139
F: drivers/net/wireless/ath/ath5k/
31403140

31413141
ATHEROS ATH6KL WIRELESS DRIVER
3142-
M: Kalle Valo <kvalo@kernel.org>
31433142
L: linux-wireless@vger.kernel.org
3144-
S: Supported
3143+
S: Orphan
31453144
W: https://wireless.wiki.kernel.org/en/users/Drivers/ath6kl
3146-
T: git git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git
31473145
F: drivers/net/wireless/ath/ath6kl/
31483146

31493147
ATI_REMOTE2 DRIVER
@@ -7188,7 +7186,7 @@ F: drivers/net/can/usb/etas_es58x/
71887186

71897187
ETHERNET BRIDGE
71907188
M: Roopa Prabhu <roopa@nvidia.com>
7191-
M: Nikolay Aleksandrov <nikolay@nvidia.com>
7189+
M: Nikolay Aleksandrov <razor@blackwall.org>
71927190
L: bridge@lists.linux-foundation.org (moderated for non-subscribers)
71937191
L: netdev@vger.kernel.org
71947192
S: Maintained
@@ -15912,18 +15910,20 @@ S: Supported
1591215910
W: https://wireless.wiki.kernel.org/en/users/Drivers/ath10k
1591315911
T: git git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git
1591415912
F: drivers/net/wireless/ath/ath10k/
15913+
F: Documentation/devicetree/bindings/net/wireless/qcom,ath10k.txt
1591515914

1591615915
QUALCOMM ATHEROS ATH11K WIRELESS DRIVER
1591715916
M: Kalle Valo <kvalo@kernel.org>
1591815917
L: ath11k@lists.infradead.org
1591915918
S: Supported
1592015919
T: git git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git
1592115920
F: drivers/net/wireless/ath/ath11k/
15921+
F: Documentation/devicetree/bindings/net/wireless/qcom,ath11k.txt
1592215922

1592315923
QUALCOMM ATHEROS ATH9K WIRELESS DRIVER
15924-
M: ath9k-devel@qca.qualcomm.com
15924+
M: Toke Høiland-Jørgensen <toke@toke.dk>
1592515925
L: linux-wireless@vger.kernel.org
15926-
S: Supported
15926+
S: Maintained
1592715927
W: https://wireless.wiki.kernel.org/en/users/Drivers/ath9k
1592815928
F: Documentation/devicetree/bindings/net/wireless/qca,ath9k.yaml
1592915929
F: drivers/net/wireless/ath/ath9k/
@@ -16104,11 +16104,10 @@ F: Documentation/devicetree/bindings/media/*venus*
1610416104
F: drivers/media/platform/qcom/venus/
1610516105

1610616106
QUALCOMM WCN36XX WIRELESS DRIVER
16107-
M: Kalle Valo <kvalo@kernel.org>
16107+
M: Loic Poulain <loic.poulain@linaro.org>
1610816108
L: wcn36xx@lists.infradead.org
1610916109
S: Supported
1611016110
W: https://wireless.wiki.kernel.org/en/users/Drivers/wcn36xx
16111-
T: git git://github.com/KrasnikovEugene/wcn36xx.git
1611216111
F: drivers/net/wireless/ath/wcn36xx/
1611316112

1611416113
QUANTENNA QTNFMAC WIRELESS DRIVER

crypto/af_alg.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,9 @@ struct alg_type_list {
2525
struct list_head list;
2626
};
2727

28-
static atomic_long_t alg_memory_allocated;
29-
3028
static struct proto alg_proto = {
3129
.name = "ALG",
3230
.owner = THIS_MODULE,
33-
.memory_allocated = &alg_memory_allocated,
3431
.obj_size = sizeof(struct alg_sock),
3532
};
3633

drivers/net/bonding/bond_3ad.c

Lines changed: 25 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ static inline int __check_agg_selection_timer(struct port *port)
225225
if (bond == NULL)
226226
return 0;
227227

228-
return BOND_AD_INFO(bond).agg_select_timer ? 1 : 0;
228+
return atomic_read(&BOND_AD_INFO(bond).agg_select_timer) ? 1 : 0;
229229
}
230230

231231
/**
@@ -1995,7 +1995,7 @@ static void ad_marker_response_received(struct bond_marker *marker,
19951995
*/
19961996
void bond_3ad_initiate_agg_selection(struct bonding *bond, int timeout)
19971997
{
1998-
BOND_AD_INFO(bond).agg_select_timer = timeout;
1998+
atomic_set(&BOND_AD_INFO(bond).agg_select_timer, timeout);
19991999
}
20002000

20012001
/**
@@ -2278,6 +2278,28 @@ void bond_3ad_update_ad_actor_settings(struct bonding *bond)
22782278
spin_unlock_bh(&bond->mode_lock);
22792279
}
22802280

2281+
/**
2282+
* bond_agg_timer_advance - advance agg_select_timer
2283+
* @bond: bonding structure
2284+
*
2285+
* Return true when agg_select_timer reaches 0.
2286+
*/
2287+
static bool bond_agg_timer_advance(struct bonding *bond)
2288+
{
2289+
int val, nval;
2290+
2291+
while (1) {
2292+
val = atomic_read(&BOND_AD_INFO(bond).agg_select_timer);
2293+
if (!val)
2294+
return false;
2295+
nval = val - 1;
2296+
if (atomic_cmpxchg(&BOND_AD_INFO(bond).agg_select_timer,
2297+
val, nval) == val)
2298+
break;
2299+
}
2300+
return nval == 0;
2301+
}
2302+
22812303
/**
22822304
* bond_3ad_state_machine_handler - handle state machines timeout
22832305
* @work: work context to fetch bonding struct to work on from
@@ -2313,9 +2335,7 @@ void bond_3ad_state_machine_handler(struct work_struct *work)
23132335
if (!bond_has_slaves(bond))
23142336
goto re_arm;
23152337

2316-
/* check if agg_select_timer timer after initialize is timed out */
2317-
if (BOND_AD_INFO(bond).agg_select_timer &&
2318-
!(--BOND_AD_INFO(bond).agg_select_timer)) {
2338+
if (bond_agg_timer_advance(bond)) {
23192339
slave = bond_first_slave_rcu(bond);
23202340
port = slave ? &(SLAVE_AD_INFO(slave)->port) : NULL;
23212341

drivers/net/bonding/bond_main.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2379,10 +2379,9 @@ static int __bond_release_one(struct net_device *bond_dev,
23792379
bond_select_active_slave(bond);
23802380
}
23812381

2382-
if (!bond_has_slaves(bond)) {
2383-
bond_set_carrier(bond);
2382+
bond_set_carrier(bond);
2383+
if (!bond_has_slaves(bond))
23842384
eth_hw_addr_random(bond_dev);
2385-
}
23862385

23872386
unblock_netpoll_tx();
23882387
synchronize_rcu();

drivers/net/dsa/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ config NET_DSA_REALTEK_SMI
8282

8383
config NET_DSA_SMSC_LAN9303
8484
tristate
85+
depends on VLAN_8021Q || VLAN_8021Q=n
8586
select NET_DSA_TAG_LAN9303
8687
select REGMAP
8788
help

drivers/net/dsa/lan9303-core.c

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
#include <linux/mii.h>
1111
#include <linux/phy.h>
1212
#include <linux/if_bridge.h>
13+
#include <linux/if_vlan.h>
1314
#include <linux/etherdevice.h>
1415

1516
#include "lan9303.h"
@@ -1083,21 +1084,27 @@ static void lan9303_adjust_link(struct dsa_switch *ds, int port,
10831084
static int lan9303_port_enable(struct dsa_switch *ds, int port,
10841085
struct phy_device *phy)
10851086
{
1087+
struct dsa_port *dp = dsa_to_port(ds, port);
10861088
struct lan9303 *chip = ds->priv;
10871089

1088-
if (!dsa_is_user_port(ds, port))
1090+
if (!dsa_port_is_user(dp))
10891091
return 0;
10901092

1093+
vlan_vid_add(dp->cpu_dp->master, htons(ETH_P_8021Q), port);
1094+
10911095
return lan9303_enable_processing_port(chip, port);
10921096
}
10931097

10941098
static void lan9303_port_disable(struct dsa_switch *ds, int port)
10951099
{
1100+
struct dsa_port *dp = dsa_to_port(ds, port);
10961101
struct lan9303 *chip = ds->priv;
10971102

1098-
if (!dsa_is_user_port(ds, port))
1103+
if (!dsa_port_is_user(dp))
10991104
return;
11001105

1106+
vlan_vid_del(dp->cpu_dp->master, htons(ETH_P_8021Q), port);
1107+
11011108
lan9303_disable_processing_port(chip, port);
11021109
lan9303_phy_write(ds, chip->phy_addr_base + port, MII_BMCR, BMCR_PDOWN);
11031110
}
@@ -1310,7 +1317,7 @@ static int lan9303_probe_reset_gpio(struct lan9303 *chip,
13101317
struct device_node *np)
13111318
{
13121319
chip->reset_gpio = devm_gpiod_get_optional(chip->dev, "reset",
1313-
GPIOD_OUT_LOW);
1320+
GPIOD_OUT_HIGH);
13141321
if (IS_ERR(chip->reset_gpio))
13151322
return PTR_ERR(chip->reset_gpio);
13161323

drivers/net/dsa/lantiq_gswip.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2176,8 +2176,8 @@ static int gswip_remove(struct platform_device *pdev)
21762176

21772177
if (priv->ds->slave_mii_bus) {
21782178
mdiobus_unregister(priv->ds->slave_mii_bus);
2179-
mdiobus_free(priv->ds->slave_mii_bus);
21802179
of_node_put(priv->ds->slave_mii_bus->dev.of_node);
2180+
mdiobus_free(priv->ds->slave_mii_bus);
21812181
}
21822182

21832183
for (i = 0; i < priv->num_gphy_fw; i++)

drivers/net/dsa/mv88e6xxx/chip.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2284,6 +2284,13 @@ static int mv88e6xxx_port_vlan_del(struct dsa_switch *ds, int port,
22842284
if (!mv88e6xxx_max_vid(chip))
22852285
return -EOPNOTSUPP;
22862286

2287+
/* The ATU removal procedure needs the FID to be mapped in the VTU,
2288+
* but FDB deletion runs concurrently with VLAN deletion. Flush the DSA
2289+
* switchdev workqueue to ensure that all FDB entries are deleted
2290+
* before we remove the VLAN.
2291+
*/
2292+
dsa_flush_workqueue();
2293+
22872294
mv88e6xxx_reg_lock(chip);
22882295

22892296
err = mv88e6xxx_port_get_pvid(chip, port, &pvid);

drivers/net/ethernet/atheros/atl1c/atl1c_main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -900,7 +900,7 @@ static void atl1c_clean_tx_ring(struct atl1c_adapter *adapter,
900900
atl1c_clean_buffer(pdev, buffer_info);
901901
}
902902

903-
netdev_reset_queue(adapter->netdev);
903+
netdev_tx_reset_queue(netdev_get_tx_queue(adapter->netdev, queue));
904904

905905
/* Zero out Tx-buffers */
906906
memset(tpd_ring->desc, 0, sizeof(struct atl1c_tpd_desc) *

drivers/net/ethernet/broadcom/bgmac-platform.c

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,7 @@ static int bgmac_probe(struct platform_device *pdev)
172172
{
173173
struct device_node *np = pdev->dev.of_node;
174174
struct bgmac *bgmac;
175+
struct resource *regs;
175176
int ret;
176177

177178
bgmac = bgmac_alloc(&pdev->dev);
@@ -208,15 +209,23 @@ static int bgmac_probe(struct platform_device *pdev)
208209
if (IS_ERR(bgmac->plat.base))
209210
return PTR_ERR(bgmac->plat.base);
210211

211-
bgmac->plat.idm_base = devm_platform_ioremap_resource_byname(pdev, "idm_base");
212-
if (IS_ERR(bgmac->plat.idm_base))
213-
return PTR_ERR(bgmac->plat.idm_base);
214-
else
212+
/* The idm_base resource is optional for some platforms */
213+
regs = platform_get_resource_byname(pdev, IORESOURCE_MEM, "idm_base");
214+
if (regs) {
215+
bgmac->plat.idm_base = devm_ioremap_resource(&pdev->dev, regs);
216+
if (IS_ERR(bgmac->plat.idm_base))
217+
return PTR_ERR(bgmac->plat.idm_base);
215218
bgmac->feature_flags &= ~BGMAC_FEAT_IDM_MASK;
219+
}
216220

217-
bgmac->plat.nicpm_base = devm_platform_ioremap_resource_byname(pdev, "nicpm_base");
218-
if (IS_ERR(bgmac->plat.nicpm_base))
219-
return PTR_ERR(bgmac->plat.nicpm_base);
221+
/* The nicpm_base resource is optional for some platforms */
222+
regs = platform_get_resource_byname(pdev, IORESOURCE_MEM, "nicpm_base");
223+
if (regs) {
224+
bgmac->plat.nicpm_base = devm_ioremap_resource(&pdev->dev,
225+
regs);
226+
if (IS_ERR(bgmac->plat.nicpm_base))
227+
return PTR_ERR(bgmac->plat.nicpm_base);
228+
}
220229

221230
bgmac->read = platform_bgmac_read;
222231
bgmac->write = platform_bgmac_write;

0 commit comments

Comments
 (0)