Skip to content

Commit 165563c

Browse files
committed
Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
Pull networking fixes from David Miller: 1) Make sure SKB control block is in the proper state during IPSEC ESP-in-TCP encapsulation. From Sabrina Dubroca. 2) Various kinds of attributes were not being cloned properly when we build new xfrm_state objects from existing ones. Fix from Antony Antony. 3) Make sure to keep BTF sections, from Tony Ambardar. 4) TX DMA channels need proper locking in lantiq driver, from Hauke Mehrtens. 5) Honour route MTU during forwarding, always. From Maciej Żenczykowski. 6) Fix races in kTLS which can result in crashes, from Rohit Maheshwari. 7) Skip TCP DSACKs with rediculous sequence ranges, from Priyaranjan Jha. 8) Use correct address family in xfrm state lookups, from Herbert Xu. 9) A bridge FDB flush should not clear out user managed fdb entries with the ext_learn flag set, from Nikolay Aleksandrov. 10) Fix nested locking of netdev address lists, from Taehee Yoo. 11) Fix handling of 32-bit DATA_FIN values in mptcp, from Mat Martineau. 12) Fix r8169 data corruptions on RTL8402 chips, from Heiner Kallweit. 13) Don't free command entries in mlx5 while comp handler could still be running, from Eran Ben Elisha. 14) Error flow of request_irq() in mlx5 is busted, due to an off by one we try to free and IRQ never allocated. From Maor Gottlieb. 15) Fix leak when dumping netlink policies, from Johannes Berg. 16) Sendpage cannot be performed when a page is a slab page, or the page count is < 1. Some subsystems such as nvme were doing so. Create a "sendpage_ok()" helper and use it as needed, from Coly Li. 17) Don't leak request socket when using syncookes with mptcp, from Paolo Abeni. * git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (111 commits) net/core: check length before updating Ethertype in skb_mpls_{push,pop} net: mvneta: fix double free of txq->buf net_sched: check error pointer in tcf_dump_walker() net: team: fix memory leak in __team_options_register net: typhoon: Fix a typo Typoon --> Typhoon net: hinic: fix DEVLINK build errors net: stmmac: Modify configuration method of EEE timers tcp: fix syn cookied MPTCP request socket leak libceph: use sendpage_ok() in ceph_tcp_sendpage() scsi: libiscsi: use sendpage_ok() in iscsi_tcp_segment_map() drbd: code cleanup by using sendpage_ok() to check page for kernel_sendpage() tcp: use sendpage_ok() to detect misused .sendpage nvme-tcp: check page by sendpage_ok() before calling kernel_sendpage() net: add WARN_ONCE in kernel_sendpage() for improper zero-copy send net: introduce helper sendpage_ok() in include/linux/net.h net: usb: pegasus: Proper error handing when setting pegasus' MAC address net: core: document two new elements of struct net_device netlink: fix policy dump leak net/mlx5e: Fix race condition on nhe->n pointer in neigh update net/mlx5e: Fix VLAN create flow ...
2 parents 549738f + 4296adc commit 165563c

File tree

140 files changed

+1380
-690
lines changed

Some content is hidden

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

140 files changed

+1380
-690
lines changed

Documentation/devicetree/bindings/net/renesas,ravb.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ Required properties:
2121
- "renesas,etheravb-r8a774a1" for the R8A774A1 SoC.
2222
- "renesas,etheravb-r8a774b1" for the R8A774B1 SoC.
2323
- "renesas,etheravb-r8a774c0" for the R8A774C0 SoC.
24+
- "renesas,etheravb-r8a774e1" for the R8A774E1 SoC.
2425
- "renesas,etheravb-r8a7795" for the R8A7795 SoC.
2526
- "renesas,etheravb-r8a7796" for the R8A77960 SoC.
2627
- "renesas,etheravb-r8a77961" for the R8A77961 SoC.

MAINTAINERS

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8752,7 +8752,8 @@ F: include/drm/i915*
87528752
F: include/uapi/drm/i915_drm.h
87538753

87548754
INTEL ETHERNET DRIVERS
8755-
M: Jeff Kirsher <[email protected]>
8755+
M: Jesse Brandeburg <[email protected]>
8756+
M: Tony Nguyen <[email protected]>
87568757
L: [email protected] (moderated for non-subscribers)
87578758
S: Supported
87588759
W: http://www.intel.com/support/feedback.htm
@@ -12077,6 +12078,7 @@ NETWORKING [DSA]
1207712078
M: Andrew Lunn <[email protected]>
1207812079
M: Vivien Didelot <[email protected]>
1207912080
M: Florian Fainelli <[email protected]>
12081+
M: Vladimir Oltean <[email protected]>
1208012082
S: Maintained
1208112083
F: Documentation/devicetree/bindings/net/dsa/
1208212084
F: drivers/net/dsa/
@@ -18282,7 +18284,8 @@ F: drivers/gpu/vga/vga_switcheroo.c
1828218284
F: include/linux/vga_switcheroo.h
1828318285

1828418286
VIA RHINE NETWORK DRIVER
18285-
S: Orphan
18287+
S: Maintained
18288+
M: Kevin Brace <[email protected]>
1828618289
F: drivers/net/ethernet/via/via-rhine.c
1828718290

1828818291
VIA SD/MMC CARD CONTROLLER DRIVER

arch/powerpc/net/bpf_jit_comp.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -475,7 +475,6 @@ static int bpf_jit_build_body(struct bpf_prog *fp, u32 *image,
475475
case BPF_JMP | BPF_JSET | BPF_K:
476476
case BPF_JMP | BPF_JSET | BPF_X:
477477
true_cond = COND_NE;
478-
fallthrough;
479478
cond_branch:
480479
/* same targets, can avoid doing the test :) */
481480
if (filter[i].jt == filter[i].jf) {

drivers/block/drbd/drbd_main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1553,7 +1553,7 @@ static int _drbd_send_page(struct drbd_peer_device *peer_device, struct page *pa
15531553
* put_page(); and would cause either a VM_BUG directly, or
15541554
* __page_cache_release a page that would actually still be referenced
15551555
* by someone, leading to some obscure delayed Oops somewhere else. */
1556-
if (drbd_disable_sendpage || (page_count(page) < 1) || PageSlab(page))
1556+
if (drbd_disable_sendpage || !sendpage_ok(page))
15571557
return _drbd_no_send_page(peer_device, page, offset, size, msg_flags);
15581558

15591559
msg_flags |= MSG_NOSIGNAL;

drivers/infiniband/core/cache.c

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1320,9 +1320,10 @@ struct net_device *rdma_read_gid_attr_ndev_rcu(const struct ib_gid_attr *attr)
13201320
}
13211321
EXPORT_SYMBOL(rdma_read_gid_attr_ndev_rcu);
13221322

1323-
static int get_lower_dev_vlan(struct net_device *lower_dev, void *data)
1323+
static int get_lower_dev_vlan(struct net_device *lower_dev,
1324+
struct netdev_nested_priv *priv)
13241325
{
1325-
u16 *vlan_id = data;
1326+
u16 *vlan_id = (u16 *)priv->data;
13261327

13271328
if (is_vlan_dev(lower_dev))
13281329
*vlan_id = vlan_dev_vlan_id(lower_dev);
@@ -1348,6 +1349,9 @@ static int get_lower_dev_vlan(struct net_device *lower_dev, void *data)
13481349
int rdma_read_gid_l2_fields(const struct ib_gid_attr *attr,
13491350
u16 *vlan_id, u8 *smac)
13501351
{
1352+
struct netdev_nested_priv priv = {
1353+
.data = (void *)vlan_id,
1354+
};
13511355
struct net_device *ndev;
13521356

13531357
rcu_read_lock();
@@ -1368,7 +1372,7 @@ int rdma_read_gid_l2_fields(const struct ib_gid_attr *attr,
13681372
* the lower vlan device for this gid entry.
13691373
*/
13701374
netdev_walk_all_lower_dev_rcu(attr->ndev,
1371-
get_lower_dev_vlan, vlan_id);
1375+
get_lower_dev_vlan, &priv);
13721376
}
13731377
}
13741378
rcu_read_unlock();

drivers/infiniband/core/cma.c

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2865,9 +2865,10 @@ struct iboe_prio_tc_map {
28652865
bool found;
28662866
};
28672867

2868-
static int get_lower_vlan_dev_tc(struct net_device *dev, void *data)
2868+
static int get_lower_vlan_dev_tc(struct net_device *dev,
2869+
struct netdev_nested_priv *priv)
28692870
{
2870-
struct iboe_prio_tc_map *map = data;
2871+
struct iboe_prio_tc_map *map = (struct iboe_prio_tc_map *)priv->data;
28712872

28722873
if (is_vlan_dev(dev))
28732874
map->output_tc = get_vlan_ndev_tc(dev, map->input_prio);
@@ -2886,16 +2887,18 @@ static int iboe_tos_to_sl(struct net_device *ndev, int tos)
28862887
{
28872888
struct iboe_prio_tc_map prio_tc_map = {};
28882889
int prio = rt_tos2priority(tos);
2890+
struct netdev_nested_priv priv;
28892891

28902892
/* If VLAN device, get it directly from the VLAN netdev */
28912893
if (is_vlan_dev(ndev))
28922894
return get_vlan_ndev_tc(ndev, prio);
28932895

28942896
prio_tc_map.input_prio = prio;
2897+
priv.data = (void *)&prio_tc_map;
28952898
rcu_read_lock();
28962899
netdev_walk_all_lower_dev_rcu(ndev,
28972900
get_lower_vlan_dev_tc,
2898-
&prio_tc_map);
2901+
&priv);
28992902
rcu_read_unlock();
29002903
/* If map is found from lower device, use it; Otherwise
29012904
* continue with the current netdevice to get priority to tc map.

drivers/infiniband/core/roce_gid_mgmt.c

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -531,10 +531,11 @@ struct upper_list {
531531
struct net_device *upper;
532532
};
533533

534-
static int netdev_upper_walk(struct net_device *upper, void *data)
534+
static int netdev_upper_walk(struct net_device *upper,
535+
struct netdev_nested_priv *priv)
535536
{
536537
struct upper_list *entry = kmalloc(sizeof(*entry), GFP_ATOMIC);
537-
struct list_head *upper_list = data;
538+
struct list_head *upper_list = (struct list_head *)priv->data;
538539

539540
if (!entry)
540541
return 0;
@@ -553,12 +554,14 @@ static void handle_netdev_upper(struct ib_device *ib_dev, u8 port,
553554
struct net_device *ndev))
554555
{
555556
struct net_device *ndev = cookie;
557+
struct netdev_nested_priv priv;
556558
struct upper_list *upper_iter;
557559
struct upper_list *upper_temp;
558560
LIST_HEAD(upper_list);
559561

562+
priv.data = &upper_list;
560563
rcu_read_lock();
561-
netdev_walk_all_upper_dev_rcu(ndev, netdev_upper_walk, &upper_list);
564+
netdev_walk_all_upper_dev_rcu(ndev, netdev_upper_walk, &priv);
562565
rcu_read_unlock();
563566

564567
handle_netdev(ib_dev, port, ndev);

drivers/infiniband/ulp/ipoib/ipoib_main.c

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -342,9 +342,10 @@ struct ipoib_walk_data {
342342
struct net_device *result;
343343
};
344344

345-
static int ipoib_upper_walk(struct net_device *upper, void *_data)
345+
static int ipoib_upper_walk(struct net_device *upper,
346+
struct netdev_nested_priv *priv)
346347
{
347-
struct ipoib_walk_data *data = _data;
348+
struct ipoib_walk_data *data = (struct ipoib_walk_data *)priv->data;
348349
int ret = 0;
349350

350351
if (ipoib_is_dev_match_addr_rcu(data->addr, upper)) {
@@ -368,18 +369,20 @@ static int ipoib_upper_walk(struct net_device *upper, void *_data)
368369
static struct net_device *ipoib_get_net_dev_match_addr(
369370
const struct sockaddr *addr, struct net_device *dev)
370371
{
372+
struct netdev_nested_priv priv;
371373
struct ipoib_walk_data data = {
372374
.addr = addr,
373375
};
374376

377+
priv.data = (void *)&data;
375378
rcu_read_lock();
376379
if (ipoib_is_dev_match_addr_rcu(addr, dev)) {
377380
dev_hold(dev);
378381
data.result = dev;
379382
goto out;
380383
}
381384

382-
netdev_walk_all_upper_dev_rcu(dev, ipoib_upper_walk, &data);
385+
netdev_walk_all_upper_dev_rcu(dev, ipoib_upper_walk, &priv);
383386
out:
384387
rcu_read_unlock();
385388
return data.result;

drivers/net/bonding/bond_alb.c

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -942,9 +942,10 @@ struct alb_walk_data {
942942
bool strict_match;
943943
};
944944

945-
static int alb_upper_dev_walk(struct net_device *upper, void *_data)
945+
static int alb_upper_dev_walk(struct net_device *upper,
946+
struct netdev_nested_priv *priv)
946947
{
947-
struct alb_walk_data *data = _data;
948+
struct alb_walk_data *data = (struct alb_walk_data *)priv->data;
948949
bool strict_match = data->strict_match;
949950
struct bonding *bond = data->bond;
950951
struct slave *slave = data->slave;
@@ -983,21 +984,23 @@ static void alb_send_learning_packets(struct slave *slave, u8 mac_addr[],
983984
bool strict_match)
984985
{
985986
struct bonding *bond = bond_get_bond_by_slave(slave);
987+
struct netdev_nested_priv priv;
986988
struct alb_walk_data data = {
987989
.strict_match = strict_match,
988990
.mac_addr = mac_addr,
989991
.slave = slave,
990992
.bond = bond,
991993
};
992994

995+
priv.data = (void *)&data;
993996
/* send untagged */
994997
alb_send_lp_vid(slave, mac_addr, 0, 0);
995998

996999
/* loop through all devices and see if we need to send a packet
9971000
* for that device.
9981001
*/
9991002
rcu_read_lock();
1000-
netdev_walk_all_upper_dev_rcu(bond->dev, alb_upper_dev_walk, &data);
1003+
netdev_walk_all_upper_dev_rcu(bond->dev, alb_upper_dev_walk, &priv);
10011004
rcu_read_unlock();
10021005
}
10031006

drivers/net/bonding/bond_main.c

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1315,6 +1315,7 @@ static void bond_setup_by_slave(struct net_device *bond_dev,
13151315

13161316
bond_dev->type = slave_dev->type;
13171317
bond_dev->hard_header_len = slave_dev->hard_header_len;
1318+
bond_dev->needed_headroom = slave_dev->needed_headroom;
13181319
bond_dev->addr_len = slave_dev->addr_len;
13191320

13201321
memcpy(bond_dev->broadcast, slave_dev->broadcast,
@@ -2510,22 +2511,26 @@ static void bond_mii_monitor(struct work_struct *work)
25102511
}
25112512
}
25122513

2513-
static int bond_upper_dev_walk(struct net_device *upper, void *data)
2514+
static int bond_upper_dev_walk(struct net_device *upper,
2515+
struct netdev_nested_priv *priv)
25142516
{
2515-
__be32 ip = *((__be32 *)data);
2517+
__be32 ip = *(__be32 *)priv->data;
25162518

25172519
return ip == bond_confirm_addr(upper, 0, ip);
25182520
}
25192521

25202522
static bool bond_has_this_ip(struct bonding *bond, __be32 ip)
25212523
{
2524+
struct netdev_nested_priv priv = {
2525+
.data = (void *)&ip,
2526+
};
25222527
bool ret = false;
25232528

25242529
if (ip == bond_confirm_addr(bond->dev, 0, ip))
25252530
return true;
25262531

25272532
rcu_read_lock();
2528-
if (netdev_walk_all_upper_dev_rcu(bond->dev, bond_upper_dev_walk, &ip))
2533+
if (netdev_walk_all_upper_dev_rcu(bond->dev, bond_upper_dev_walk, &priv))
25292534
ret = true;
25302535
rcu_read_unlock();
25312536

0 commit comments

Comments
 (0)