Skip to content

Commit f8e6dfc

Browse files
committed
Merge tag 'net-5.14-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
Pull networking fixes from Jakub Kicinski: "Networking fixes, including fixes from netfilter, bpf, can and ieee802154. The size of this is pretty normal, but we got more fixes for 5.14 changes this week than last week. Nothing major but the trend is the opposite of what we like. We'll see how the next week goes.. Current release - regressions: - r8169: fix ASPM-related link-up regressions - bridge: fix flags interpretation for extern learn fdb entries - phy: micrel: fix link detection on ksz87xx switch - Revert "tipc: Return the correct errno code" - ptp: fix possible memory leak caused by invalid cast Current release - new code bugs: - bpf: add missing bpf_read_[un]lock_trace() for syscall program - bpf: fix potentially incorrect results with bpf_get_local_storage() - page_pool: mask the page->signature before the checking, avoid dma mapping leaks - netfilter: nfnetlink_hook: 5 fixes to information in netlink dumps - bnxt_en: fix firmware interface issues with PTP - mlx5: Bridge, fix ageing time Previous releases - regressions: - linkwatch: fix failure to restore device state across suspend/resume - bareudp: fix invalid read beyond skb's linear data Previous releases - always broken: - bpf: fix integer overflow involving bucket_size - ppp: fix issues when desired interface name is specified via netlink - wwan: mhi_wwan_ctrl: fix possible deadlock - dsa: microchip: ksz8795: fix number of VLAN related bugs - dsa: drivers: fix broken backpressure in .port_fdb_dump - dsa: qca: ar9331: make proper initial port defaults Misc: - bpf: add lockdown check for probe_write_user helper - netfilter: conntrack: remove offload_pickup sysctl before 5.14 is out - netfilter: conntrack: collect all entries in one cycle, heuristically slow down garbage collection scans on idle systems to prevent frequent wake ups" * tag 'net-5.14-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (87 commits) vsock/virtio: avoid potential deadlock when vsock device remove wwan: core: Avoid returning NULL from wwan_create_dev() net: dsa: sja1105: unregister the MDIO buses during teardown Revert "tipc: Return the correct errno code" net: mscc: Fix non-GPL export of regmap APIs net: igmp: increase size of mr_ifc_count MAINTAINERS: switch to my OMP email for Renesas Ethernet drivers tcp_bbr: fix u32 wrap bug in round logic if bbr_init() called after 2B packets net: pcs: xpcs: fix error handling on failed to allocate memory net: linkwatch: fix failure to restore device state across suspend/resume net: bridge: fix memleak in br_add_if() net: switchdev: zero-initialize struct switchdev_notifier_fdb_info emitted by drivers towards the bridge net: bridge: fix flags interpretation for extern learn fdb entries net: dsa: sja1105: fix broken backpressure in .port_fdb_dump net: dsa: lantiq: fix broken backpressure in .port_fdb_dump net: dsa: lan9303: fix broken backpressure in .port_fdb_dump net: dsa: hellcreek: fix broken backpressure in .port_fdb_dump bpf, core: Fix kernel-doc notation net: igmp: fix data-race in igmp_ifc_timer_expire() net: Fix memory leak in ieee802154_raw_deliver ...
2 parents 3a03c67 + a9a5070 commit f8e6dfc

File tree

118 files changed

+763
-372
lines changed

Some content is hidden

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

118 files changed

+763
-372
lines changed

Documentation/bpf/libbpf/libbpf_naming_convention.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ This bump in ABI version is at most once per kernel development cycle.
108108

109109
For example, if current state of ``libbpf.map`` is:
110110

111-
.. code-block:: c
111+
.. code-block:: none
112112
113113
LIBBPF_0.0.1 {
114114
global:
@@ -121,7 +121,7 @@ For example, if current state of ``libbpf.map`` is:
121121
, and a new symbol ``bpf_func_c`` is being introduced, then
122122
``libbpf.map`` should be changed like this:
123123

124-
.. code-block:: c
124+
.. code-block:: none
125125
126126
LIBBPF_0.0.1 {
127127
global:

Documentation/networking/nf_conntrack-sysctl.rst

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -191,19 +191,9 @@ nf_flowtable_tcp_timeout - INTEGER (seconds)
191191
TCP connections may be offloaded from nf conntrack to nf flow table.
192192
Once aged, the connection is returned to nf conntrack with tcp pickup timeout.
193193

194-
nf_flowtable_tcp_pickup - INTEGER (seconds)
195-
default 120
196-
197-
TCP connection timeout after being aged from nf flow table offload.
198-
199194
nf_flowtable_udp_timeout - INTEGER (seconds)
200195
default 30
201196

202197
Control offload timeout for udp connections.
203198
UDP connections may be offloaded from nf conntrack to nf flow table.
204199
Once aged, the connection is returned to nf conntrack with udp pickup timeout.
205-
206-
nf_flowtable_udp_pickup - INTEGER (seconds)
207-
default 30
208-
209-
UDP connection timeout after being aged from nf flow table offload.

MAINTAINERS

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11327,7 +11327,7 @@ W: https://linuxtv.org
1132711327
T: git git://linuxtv.org/media_tree.git
1132811328
F: drivers/media/radio/radio-maxiradio*
1132911329

11330-
MCAB MICROCHIP CAN BUS ANALYZER TOOL DRIVER
11330+
MCBA MICROCHIP CAN BUS ANALYZER TOOL DRIVER
1133111331
R: Yasushi SHOJI <[email protected]>
1133211332
1133311333
S: Maintained
@@ -15803,7 +15803,7 @@ F: Documentation/devicetree/bindings/i2c/renesas,iic-emev2.yaml
1580315803
F: drivers/i2c/busses/i2c-emev2.c
1580415804

1580515805
RENESAS ETHERNET DRIVERS
15806-
R: Sergei Shtylyov <sergei.shtylyov@gmail.com>
15806+
R: Sergey Shtylyov <s.shtylyov@omp.ru>
1580715807
1580815808
1580915809
F: Documentation/devicetree/bindings/net/renesas,*.yaml

drivers/infiniband/hw/mlx5/cq.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -945,7 +945,6 @@ int mlx5_ib_create_cq(struct ib_cq *ibcq, const struct ib_cq_init_attr *attr,
945945
u32 *cqb = NULL;
946946
void *cqc;
947947
int cqe_size;
948-
unsigned int irqn;
949948
int eqn;
950949
int err;
951950

@@ -984,7 +983,7 @@ int mlx5_ib_create_cq(struct ib_cq *ibcq, const struct ib_cq_init_attr *attr,
984983
INIT_WORK(&cq->notify_work, notify_soft_wc_handler);
985984
}
986985

987-
err = mlx5_vector2eqn(dev->mdev, vector, &eqn, &irqn);
986+
err = mlx5_vector2eqn(dev->mdev, vector, &eqn);
988987
if (err)
989988
goto err_cqb;
990989

@@ -1007,7 +1006,6 @@ int mlx5_ib_create_cq(struct ib_cq *ibcq, const struct ib_cq_init_attr *attr,
10071006
goto err_cqb;
10081007

10091008
mlx5_ib_dbg(dev, "cqn 0x%x\n", cq->mcq.cqn);
1010-
cq->mcq.irqn = irqn;
10111009
if (udata)
10121010
cq->mcq.tasklet_ctx.comp = mlx5_ib_cq_comp;
10131011
else

drivers/infiniband/hw/mlx5/devx.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -975,7 +975,6 @@ static int UVERBS_HANDLER(MLX5_IB_METHOD_DEVX_QUERY_EQN)(
975975
struct mlx5_ib_dev *dev;
976976
int user_vector;
977977
int dev_eqn;
978-
unsigned int irqn;
979978
int err;
980979

981980
if (uverbs_copy_from(&user_vector, attrs,
@@ -987,7 +986,7 @@ static int UVERBS_HANDLER(MLX5_IB_METHOD_DEVX_QUERY_EQN)(
987986
return PTR_ERR(c);
988987
dev = to_mdev(c->ibucontext.device);
989988

990-
err = mlx5_vector2eqn(dev->mdev, user_vector, &dev_eqn, &irqn);
989+
err = mlx5_vector2eqn(dev->mdev, user_vector, &dev_eqn);
991990
if (err < 0)
992991
return err;
993992

drivers/net/bareudp.c

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -71,12 +71,18 @@ static int bareudp_udp_encap_recv(struct sock *sk, struct sk_buff *skb)
7171
family = AF_INET6;
7272

7373
if (bareudp->ethertype == htons(ETH_P_IP)) {
74-
struct iphdr *iphdr;
74+
__u8 ipversion;
7575

76-
iphdr = (struct iphdr *)(skb->data + BAREUDP_BASE_HLEN);
77-
if (iphdr->version == 4) {
78-
proto = bareudp->ethertype;
79-
} else if (bareudp->multi_proto_mode && (iphdr->version == 6)) {
76+
if (skb_copy_bits(skb, BAREUDP_BASE_HLEN, &ipversion,
77+
sizeof(ipversion))) {
78+
bareudp->dev->stats.rx_dropped++;
79+
goto drop;
80+
}
81+
ipversion >>= 4;
82+
83+
if (ipversion == 4) {
84+
proto = htons(ETH_P_IP);
85+
} else if (ipversion == 6 && bareudp->multi_proto_mode) {
8086
proto = htons(ETH_P_IPV6);
8187
} else {
8288
bareudp->dev->stats.rx_dropped++;

drivers/net/can/m_can/m_can.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1164,10 +1164,10 @@ static int m_can_set_bittiming(struct net_device *dev)
11641164
FIELD_PREP(TDCR_TDCO_MASK, tdco));
11651165
}
11661166

1167-
reg_btp = FIELD_PREP(NBTP_NBRP_MASK, brp) |
1168-
FIELD_PREP(NBTP_NSJW_MASK, sjw) |
1169-
FIELD_PREP(NBTP_NTSEG1_MASK, tseg1) |
1170-
FIELD_PREP(NBTP_NTSEG2_MASK, tseg2);
1167+
reg_btp |= FIELD_PREP(DBTP_DBRP_MASK, brp) |
1168+
FIELD_PREP(DBTP_DSJW_MASK, sjw) |
1169+
FIELD_PREP(DBTP_DTSEG1_MASK, tseg1) |
1170+
FIELD_PREP(DBTP_DTSEG2_MASK, tseg2);
11711171

11721172
m_can_write(cdev, M_CAN_DBTP, reg_btp);
11731173
}

drivers/net/dsa/hirschmann/hellcreek.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -912,6 +912,7 @@ static int hellcreek_fdb_dump(struct dsa_switch *ds, int port,
912912
{
913913
struct hellcreek *hellcreek = ds->priv;
914914
u16 entries;
915+
int ret = 0;
915916
size_t i;
916917

917918
mutex_lock(&hellcreek->reg_lock);
@@ -943,12 +944,14 @@ static int hellcreek_fdb_dump(struct dsa_switch *ds, int port,
943944
if (!(entry.portmask & BIT(port)))
944945
continue;
945946

946-
cb(entry.mac, 0, entry.is_static, data);
947+
ret = cb(entry.mac, 0, entry.is_static, data);
948+
if (ret)
949+
break;
947950
}
948951

949952
mutex_unlock(&hellcreek->reg_lock);
950953

951-
return 0;
954+
return ret;
952955
}
953956

954957
static int hellcreek_vlan_filtering(struct dsa_switch *ds, int port,

drivers/net/dsa/lan9303-core.c

Lines changed: 19 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -557,12 +557,12 @@ static int lan9303_alr_make_entry_raw(struct lan9303 *chip, u32 dat0, u32 dat1)
557557
return 0;
558558
}
559559

560-
typedef void alr_loop_cb_t(struct lan9303 *chip, u32 dat0, u32 dat1,
561-
int portmap, void *ctx);
560+
typedef int alr_loop_cb_t(struct lan9303 *chip, u32 dat0, u32 dat1,
561+
int portmap, void *ctx);
562562

563-
static void lan9303_alr_loop(struct lan9303 *chip, alr_loop_cb_t *cb, void *ctx)
563+
static int lan9303_alr_loop(struct lan9303 *chip, alr_loop_cb_t *cb, void *ctx)
564564
{
565-
int i;
565+
int ret = 0, i;
566566

567567
mutex_lock(&chip->alr_mutex);
568568
lan9303_write_switch_reg(chip, LAN9303_SWE_ALR_CMD,
@@ -582,13 +582,17 @@ static void lan9303_alr_loop(struct lan9303 *chip, alr_loop_cb_t *cb, void *ctx)
582582
LAN9303_ALR_DAT1_PORT_BITOFFS;
583583
portmap = alrport_2_portmap[alrport];
584584

585-
cb(chip, dat0, dat1, portmap, ctx);
585+
ret = cb(chip, dat0, dat1, portmap, ctx);
586+
if (ret)
587+
break;
586588

587589
lan9303_write_switch_reg(chip, LAN9303_SWE_ALR_CMD,
588590
LAN9303_ALR_CMD_GET_NEXT);
589591
lan9303_write_switch_reg(chip, LAN9303_SWE_ALR_CMD, 0);
590592
}
591593
mutex_unlock(&chip->alr_mutex);
594+
595+
return ret;
592596
}
593597

594598
static void alr_reg_to_mac(u32 dat0, u32 dat1, u8 mac[6])
@@ -606,18 +610,20 @@ struct del_port_learned_ctx {
606610
};
607611

608612
/* Clear learned (non-static) entry on given port */
609-
static void alr_loop_cb_del_port_learned(struct lan9303 *chip, u32 dat0,
610-
u32 dat1, int portmap, void *ctx)
613+
static int alr_loop_cb_del_port_learned(struct lan9303 *chip, u32 dat0,
614+
u32 dat1, int portmap, void *ctx)
611615
{
612616
struct del_port_learned_ctx *del_ctx = ctx;
613617
int port = del_ctx->port;
614618

615619
if (((BIT(port) & portmap) == 0) || (dat1 & LAN9303_ALR_DAT1_STATIC))
616-
return;
620+
return 0;
617621

618622
/* learned entries has only one port, we can just delete */
619623
dat1 &= ~LAN9303_ALR_DAT1_VALID; /* delete entry */
620624
lan9303_alr_make_entry_raw(chip, dat0, dat1);
625+
626+
return 0;
621627
}
622628

623629
struct port_fdb_dump_ctx {
@@ -626,19 +632,19 @@ struct port_fdb_dump_ctx {
626632
dsa_fdb_dump_cb_t *cb;
627633
};
628634

629-
static void alr_loop_cb_fdb_port_dump(struct lan9303 *chip, u32 dat0,
630-
u32 dat1, int portmap, void *ctx)
635+
static int alr_loop_cb_fdb_port_dump(struct lan9303 *chip, u32 dat0,
636+
u32 dat1, int portmap, void *ctx)
631637
{
632638
struct port_fdb_dump_ctx *dump_ctx = ctx;
633639
u8 mac[ETH_ALEN];
634640
bool is_static;
635641

636642
if ((BIT(dump_ctx->port) & portmap) == 0)
637-
return;
643+
return 0;
638644

639645
alr_reg_to_mac(dat0, dat1, mac);
640646
is_static = !!(dat1 & LAN9303_ALR_DAT1_STATIC);
641-
dump_ctx->cb(mac, 0, is_static, dump_ctx->data);
647+
return dump_ctx->cb(mac, 0, is_static, dump_ctx->data);
642648
}
643649

644650
/* Set a static ALR entry. Delete entry if port_map is zero */
@@ -1210,9 +1216,7 @@ static int lan9303_port_fdb_dump(struct dsa_switch *ds, int port,
12101216
};
12111217

12121218
dev_dbg(chip->dev, "%s(%d)\n", __func__, port);
1213-
lan9303_alr_loop(chip, alr_loop_cb_fdb_port_dump, &dump_ctx);
1214-
1215-
return 0;
1219+
return lan9303_alr_loop(chip, alr_loop_cb_fdb_port_dump, &dump_ctx);
12161220
}
12171221

12181222
static int lan9303_port_mdb_prepare(struct dsa_switch *ds, int port,

drivers/net/dsa/lantiq_gswip.c

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1404,11 +1404,17 @@ static int gswip_port_fdb_dump(struct dsa_switch *ds, int port,
14041404
addr[1] = mac_bridge.key[2] & 0xff;
14051405
addr[0] = (mac_bridge.key[2] >> 8) & 0xff;
14061406
if (mac_bridge.val[1] & GSWIP_TABLE_MAC_BRIDGE_STATIC) {
1407-
if (mac_bridge.val[0] & BIT(port))
1408-
cb(addr, 0, true, data);
1407+
if (mac_bridge.val[0] & BIT(port)) {
1408+
err = cb(addr, 0, true, data);
1409+
if (err)
1410+
return err;
1411+
}
14091412
} else {
1410-
if (((mac_bridge.val[0] & GENMASK(7, 4)) >> 4) == port)
1411-
cb(addr, 0, false, data);
1413+
if (((mac_bridge.val[0] & GENMASK(7, 4)) >> 4) == port) {
1414+
err = cb(addr, 0, false, data);
1415+
if (err)
1416+
return err;
1417+
}
14121418
}
14131419
}
14141420
return 0;

0 commit comments

Comments
 (0)