Skip to content

Commit 4e33d7d

Browse files
committed
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Pull networking fixes from David Miller: 1) Verify netlink attributes properly in nf_queue, from Eric Dumazet. 2) Need to bump memory lock rlimit for test_sockmap bpf test, from Yonghong Song. 3) Fix VLAN handling in lan78xx driver, from Dave Stevenson. 4) Fix uninitialized read in nf_log, from Jann Horn. 5) Fix raw command length parsing in mlx5, from Alex Vesker. 6) Cleanup loopback RDS connections upon netns deletion, from Sowmini Varadhan. 7) Fix regressions in FIB rule matching during create, from Jason A. Donenfeld and Roopa Prabhu. 8) Fix mpls ether type detection in nfp, from Pieter Jansen van Vuuren. 9) More bpfilter build fixes/adjustments from Masahiro Yamada. 10) Fix XDP_{TX,REDIRECT} flushing in various drivers, from Jesper Dangaard Brouer. 11) fib_tests.sh file permissions were broken, from Shuah Khan. 12) Make sure BH/preemption is disabled in data path of mac80211, from Denis Kenzior. 13) Don't ignore nla_parse_nested() return values in nl80211, from Johannes berg. 14) Properly account sock objects ot kmemcg, from Shakeel Butt. 15) Adjustments to setting bpf program permissions to read-only, from Daniel Borkmann. 16) TCP Fast Open key endianness was broken, it always took on the host endiannness. Whoops. Explicitly make it little endian. From Yuching Cheng. 17) Fix prefix route setting for link local addresses in ipv6, from David Ahern. 18) Potential Spectre v1 in zatm driver, from Gustavo A. R. Silva. 19) Various bpf sockmap fixes, from John Fastabend. 20) Use after free for GRO with ESP, from Sabrina Dubroca. 21) Passing bogus flags to crypto_alloc_shash() in ipv6 SR code, from Eric Biggers. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (87 commits) qede: Adverstise software timestamp caps when PHC is not available. qed: Fix use of incorrect size in memcpy call. qed: Fix setting of incorrect eswitch mode. qed: Limit msix vectors in kdump kernel to the minimum required count. ipvlan: call dev_change_flags when ipvlan mode is reset ipv6: sr: fix passing wrong flags to crypto_alloc_shash() net: fix use-after-free in GRO with ESP tcp: prevent bogus FRTO undos with non-SACK flows bpf: sockhash, add release routine bpf: sockhash fix omitted bucket lock in sock_close bpf: sockmap, fix smap_list_map_remove when psock is in many maps bpf: sockmap, fix crash when ipv6 sock is added net: fib_rules: bring back rule_exists to match rule during add hv_netvsc: split sub-channel setup into async and sync net: use dev_change_tx_queue_len() for SIOCSIFTXQLEN atm: zatm: Fix potential Spectre v1 s390/qeth: consistently re-enable device features s390/qeth: don't clobber buffer on async TX completion s390/qeth: avoid using is_multicast_ether_addr_64bits on (u8 *)[6] s390/qeth: fix race when setting MAC address ...
2 parents 021c917 + e48e097 commit 4e33d7d

114 files changed

Lines changed: 1249 additions & 624 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.

‎Makefile‎

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -507,11 +507,6 @@ ifeq ($(shell $(CONFIG_SHELL) $(srctree)/scripts/gcc-goto.sh $(CC) $(KBUILD_CFLA
507507
KBUILD_AFLAGS += -DCC_HAVE_ASM_GOTO
508508
endif
509509

510-
ifeq ($(shell $(CONFIG_SHELL) $(srctree)/scripts/cc-can-link.sh $(CC)), y)
511-
CC_CAN_LINK := y
512-
export CC_CAN_LINK
513-
endif
514-
515510
# The expansion should be delayed until arch/$(SRCARCH)/Makefile is included.
516511
# Some architectures define CROSS_COMPILE in arch/$(SRCARCH)/Makefile.
517512
# CC_VERSION_TEXT is referenced from Kconfig (so it needs export),

‎arch/arm/net/bpf_jit_32.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1844,7 +1844,7 @@ struct bpf_prog *bpf_int_jit_compile(struct bpf_prog *prog)
18441844
/* there are 2 passes here */
18451845
bpf_jit_dump(prog->len, image_size, 2, ctx.target);
18461846

1847-
set_memory_ro((unsigned long)header, header->pages);
1847+
bpf_jit_binary_lock_ro(header);
18481848
prog->bpf_func = (void *)ctx.target;
18491849
prog->jited = 1;
18501850
prog->jited_len = image_size;

‎arch/s390/net/bpf_jit_comp.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1286,6 +1286,7 @@ struct bpf_prog *bpf_int_jit_compile(struct bpf_prog *fp)
12861286
goto free_addrs;
12871287
}
12881288
if (bpf_jit_prog(&jit, fp)) {
1289+
bpf_jit_binary_free(header);
12891290
fp = orig_fp;
12901291
goto free_addrs;
12911292
}

‎drivers/atm/iphase.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1618,7 +1618,7 @@ static int rx_init(struct atm_dev *dev)
16181618
skb_queue_head_init(&iadev->rx_dma_q);
16191619
iadev->rx_free_desc_qhead = NULL;
16201620

1621-
iadev->rx_open = kcalloc(4, iadev->num_vc, GFP_KERNEL);
1621+
iadev->rx_open = kcalloc(iadev->num_vc, sizeof(void *), GFP_KERNEL);
16221622
if (!iadev->rx_open) {
16231623
printk(KERN_ERR DEV_LABEL "itf %d couldn't get free page\n",
16241624
dev->number);

‎drivers/atm/zatm.c‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1483,6 +1483,8 @@ static int zatm_ioctl(struct atm_dev *dev,unsigned int cmd,void __user *arg)
14831483
return -EFAULT;
14841484
if (pool < 0 || pool > ZATM_LAST_POOL)
14851485
return -EINVAL;
1486+
pool = array_index_nospec(pool,
1487+
ZATM_LAST_POOL + 1);
14861488
if (copy_from_user(&info,
14871489
&((struct zatm_pool_req __user *) arg)->info,
14881490
sizeof(info))) return -EFAULT;

‎drivers/infiniband/hw/mlx5/main.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6113,7 +6113,7 @@ static void *mlx5_ib_add(struct mlx5_core_dev *mdev)
61136113
dev->num_ports = max(MLX5_CAP_GEN(mdev, num_ports),
61146114
MLX5_CAP_GEN(mdev, num_vhca_ports));
61156115

6116-
if (MLX5_VPORT_MANAGER(mdev) &&
6116+
if (MLX5_ESWITCH_MANAGER(mdev) &&
61176117
mlx5_ib_eswitch_mode(mdev->priv.eswitch) == SRIOV_OFFLOADS) {
61186118
dev->rep = mlx5_ib_vport_rep(mdev->priv.eswitch, 0);
61196119

‎drivers/media/rc/bpf-lirc.c‎

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -207,29 +207,19 @@ void lirc_bpf_free(struct rc_dev *rcdev)
207207
bpf_prog_array_free(rcdev->raw->progs);
208208
}
209209

210-
int lirc_prog_attach(const union bpf_attr *attr)
210+
int lirc_prog_attach(const union bpf_attr *attr, struct bpf_prog *prog)
211211
{
212-
struct bpf_prog *prog;
213212
struct rc_dev *rcdev;
214213
int ret;
215214

216215
if (attr->attach_flags)
217216
return -EINVAL;
218217

219-
prog = bpf_prog_get_type(attr->attach_bpf_fd,
220-
BPF_PROG_TYPE_LIRC_MODE2);
221-
if (IS_ERR(prog))
222-
return PTR_ERR(prog);
223-
224218
rcdev = rc_dev_get_from_fd(attr->target_fd);
225-
if (IS_ERR(rcdev)) {
226-
bpf_prog_put(prog);
219+
if (IS_ERR(rcdev))
227220
return PTR_ERR(rcdev);
228-
}
229221

230222
ret = lirc_bpf_attach(rcdev, prog);
231-
if (ret)
232-
bpf_prog_put(prog);
233223

234224
put_device(&rcdev->dev);
235225

‎drivers/net/ethernet/atheros/alx/main.c‎

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1897,13 +1897,19 @@ static int alx_resume(struct device *dev)
18971897
struct pci_dev *pdev = to_pci_dev(dev);
18981898
struct alx_priv *alx = pci_get_drvdata(pdev);
18991899
struct alx_hw *hw = &alx->hw;
1900+
int err;
19001901

19011902
alx_reset_phy(hw);
19021903

19031904
if (!netif_running(alx->dev))
19041905
return 0;
19051906
netif_device_attach(alx->dev);
1906-
return __alx_open(alx, true);
1907+
1908+
rtnl_lock();
1909+
err = __alx_open(alx, true);
1910+
rtnl_unlock();
1911+
1912+
return err;
19071913
}
19081914

19091915
static SIMPLE_DEV_PM_OPS(alx_pm_ops, alx_suspend, alx_resume);

‎drivers/net/ethernet/broadcom/bnx2x/bnx2x.h‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1533,6 +1533,7 @@ struct bnx2x {
15331533
struct link_vars link_vars;
15341534
u32 link_cnt;
15351535
struct bnx2x_link_report_data last_reported_link;
1536+
bool force_link_down;
15361537

15371538
struct mdio_if_info mdio;
15381539

‎drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1261,6 +1261,11 @@ void __bnx2x_link_report(struct bnx2x *bp)
12611261
{
12621262
struct bnx2x_link_report_data cur_data;
12631263

1264+
if (bp->force_link_down) {
1265+
bp->link_vars.link_up = 0;
1266+
return;
1267+
}
1268+
12641269
/* reread mf_cfg */
12651270
if (IS_PF(bp) && !CHIP_IS_E1(bp))
12661271
bnx2x_read_mf_cfg(bp);
@@ -2817,6 +2822,7 @@ int bnx2x_nic_load(struct bnx2x *bp, int load_mode)
28172822
bp->pending_max = 0;
28182823
}
28192824

2825+
bp->force_link_down = false;
28202826
if (bp->port.pmf) {
28212827
rc = bnx2x_initial_phy_init(bp, load_mode);
28222828
if (rc)

0 commit comments

Comments
 (0)