Skip to content

Commit 19835b1

Browse files
committed
Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
Pull networking fixes from David Miller: "Another week, another set of bug fixes: 1) Fix pskb_pull length in __xfrm_transport_prep(), from Xin Long. 2) Fix double xfrm_state put in esp{4,6}_gro_receive(), also from Xin Long. 3) Re-arm discovery timer properly in mac80211 mesh code, from Linus Lüssing. 4) Prevent buffer overflows in nf_conntrack_pptp debug code, from Pablo Neira Ayuso. 5) Fix race in ktls code between tls_sw_recvmsg() and tls_decrypt_done(), from Vinay Kumar Yadav. 6) Fix crashes on TCP fallback in MPTCP code, from Paolo Abeni. 7) More validation is necessary of untrusted GSO packets coming from virtualization devices, from Willem de Bruijn. 8) Fix endianness of bnxt_en firmware message length accesses, from Edwin Peer. 9) Fix infinite loop in sch_fq_pie, from Davide Caratti. 10) Fix lockdep splat in DSA by setting lockless TX in netdev features for slave ports, from Vladimir Oltean. 11) Fix suspend/resume crashes in mlx5, from Mark Bloch. 12) Fix use after free in bpf fmod_ret, from Alexei Starovoitov. 13) ARP retransmit timer guard uses wrong offset, from Hongbin Liu. 14) Fix leak in inetdev_init(), from Yang Yingliang. 15) Don't try to use inet hash and unhash in l2tp code, results in crashes. From Eric Dumazet" * git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (77 commits) l2tp: add sk_family checks to l2tp_validate_socket l2tp: do not use inet_hash()/inet_unhash() net: qrtr: Allocate workqueue before kernel_bind mptcp: remove msk from the token container at destruction time. mptcp: fix race between MP_JOIN and close mptcp: fix unblocking connect() net/sched: act_ct: add nat mangle action only for NAT-conntrack devinet: fix memleak in inetdev_init() virtio_vsock: Fix race condition in virtio_transport_recv_pkt drivers/net/ibmvnic: Update VNIC protocol version reporting NFC: st21nfca: add missed kfree_skb() in an error path neigh: fix ARP retransmit timer guard bpf, selftests: Add a verifier test for assigning 32bit reg states to 64bit ones bpf, selftests: Verifier bounds tests need to be updated bpf: Fix a verifier issue when assigning 32bit reg states to 64bit ones bpf: Fix use-after-free in fmod_ret check net/mlx5e: replace EINVAL in mlx5e_flower_parse_meta() net/mlx5e: Fix MLX5_TC_CT dependencies net/mlx5e: Properly set default values when disabling adaptive moderation net/mlx5e: Fix arch depending casting issue in FEC ...
2 parents ffeb595 + d9a81a2 commit 19835b1

Some content is hidden

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

69 files changed

+806
-337
lines changed

arch/powerpc/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,7 @@ config PPC
126126
select ARCH_HAS_MMIOWB if PPC64
127127
select ARCH_HAS_PHYS_TO_DMA
128128
select ARCH_HAS_PMEM_API
129+
select ARCH_HAS_NON_OVERLAPPING_ADDRESS_SPACE
129130
select ARCH_HAS_PTE_DEVMAP if PPC_BOOK3S_64
130131
select ARCH_HAS_PTE_SPECIAL
131132
select ARCH_HAS_MEMBARRIER_CALLBACKS

drivers/crypto/chelsio/chtls/chtls_io.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -682,7 +682,7 @@ int chtls_push_frames(struct chtls_sock *csk, int comp)
682682
make_tx_data_wr(sk, skb, immdlen, len,
683683
credits_needed, completion);
684684
tp->snd_nxt += len;
685-
tp->lsndtime = tcp_time_stamp(tp);
685+
tp->lsndtime = tcp_jiffies32;
686686
if (completion)
687687
ULP_SKB_CB(skb)->flags &= ~ULPCB_FLAG_NEED_HDR;
688688
} else {

drivers/net/bonding/bond_sysfs_slave.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,8 +149,10 @@ int bond_sysfs_slave_add(struct slave *slave)
149149

150150
err = kobject_init_and_add(&slave->kobj, &slave_ktype,
151151
&(slave->dev->dev.kobj), "bonding_slave");
152-
if (err)
152+
if (err) {
153+
kobject_put(&slave->kobj);
153154
return err;
155+
}
154156

155157
for (a = slave_attrs; *a; ++a) {
156158
err = sysfs_create_file(&slave->kobj, &((*a)->attr));

drivers/net/dsa/ocelot/felix.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,13 +102,17 @@ static void felix_vlan_add(struct dsa_switch *ds, int port,
102102
const struct switchdev_obj_port_vlan *vlan)
103103
{
104104
struct ocelot *ocelot = ds->priv;
105+
u16 flags = vlan->flags;
105106
u16 vid;
106107
int err;
107108

109+
if (dsa_is_cpu_port(ds, port))
110+
flags &= ~BRIDGE_VLAN_INFO_UNTAGGED;
111+
108112
for (vid = vlan->vid_begin; vid <= vlan->vid_end; vid++) {
109113
err = ocelot_vlan_add(ocelot, port, vid,
110-
vlan->flags & BRIDGE_VLAN_INFO_PVID,
111-
vlan->flags & BRIDGE_VLAN_INFO_UNTAGGED);
114+
flags & BRIDGE_VLAN_INFO_PVID,
115+
flags & BRIDGE_VLAN_INFO_UNTAGGED);
112116
if (err) {
113117
dev_err(ds->dev, "Failed to add VLAN %d to port %d: %d\n",
114118
vid, port, err);

drivers/net/ethernet/broadcom/bnxt/bnxt.c

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4176,14 +4176,12 @@ static int bnxt_hwrm_do_send_msg(struct bnxt *bp, void *msg, u32 msg_len,
41764176
int i, intr_process, rc, tmo_count;
41774177
struct input *req = msg;
41784178
u32 *data = msg;
4179-
__le32 *resp_len;
41804179
u8 *valid;
41814180
u16 cp_ring_id, len = 0;
41824181
struct hwrm_err_output *resp = bp->hwrm_cmd_resp_addr;
41834182
u16 max_req_len = BNXT_HWRM_MAX_REQ_LEN;
41844183
struct hwrm_short_input short_input = {0};
41854184
u32 doorbell_offset = BNXT_GRCPF_REG_CHIMP_COMM_TRIGGER;
4186-
u8 *resp_addr = (u8 *)bp->hwrm_cmd_resp_addr;
41874185
u32 bar_offset = BNXT_GRCPF_REG_CHIMP_COMM;
41884186
u16 dst = BNXT_HWRM_CHNL_CHIMP;
41894187

@@ -4201,7 +4199,6 @@ static int bnxt_hwrm_do_send_msg(struct bnxt *bp, void *msg, u32 msg_len,
42014199
bar_offset = BNXT_GRCPF_REG_KONG_COMM;
42024200
doorbell_offset = BNXT_GRCPF_REG_KONG_COMM_TRIGGER;
42034201
resp = bp->hwrm_cmd_kong_resp_addr;
4204-
resp_addr = (u8 *)bp->hwrm_cmd_kong_resp_addr;
42054202
}
42064203

42074204
memset(resp, 0, PAGE_SIZE);
@@ -4270,7 +4267,6 @@ static int bnxt_hwrm_do_send_msg(struct bnxt *bp, void *msg, u32 msg_len,
42704267
tmo_count = HWRM_SHORT_TIMEOUT_COUNTER;
42714268
timeout = timeout - HWRM_SHORT_MIN_TIMEOUT * HWRM_SHORT_TIMEOUT_COUNTER;
42724269
tmo_count += DIV_ROUND_UP(timeout, HWRM_MIN_TIMEOUT);
4273-
resp_len = (__le32 *)(resp_addr + HWRM_RESP_LEN_OFFSET);
42744270

42754271
if (intr_process) {
42764272
u16 seq_id = bp->hwrm_intr_seq_id;
@@ -4298,9 +4294,8 @@ static int bnxt_hwrm_do_send_msg(struct bnxt *bp, void *msg, u32 msg_len,
42984294
le16_to_cpu(req->req_type));
42994295
return -EBUSY;
43004296
}
4301-
len = (le32_to_cpu(*resp_len) & HWRM_RESP_LEN_MASK) >>
4302-
HWRM_RESP_LEN_SFT;
4303-
valid = resp_addr + len - 1;
4297+
len = le16_to_cpu(resp->resp_len);
4298+
valid = ((u8 *)resp) + len - 1;
43044299
} else {
43054300
int j;
43064301

@@ -4311,8 +4306,7 @@ static int bnxt_hwrm_do_send_msg(struct bnxt *bp, void *msg, u32 msg_len,
43114306
*/
43124307
if (test_bit(BNXT_STATE_FW_FATAL_COND, &bp->state))
43134308
return -EBUSY;
4314-
len = (le32_to_cpu(*resp_len) & HWRM_RESP_LEN_MASK) >>
4315-
HWRM_RESP_LEN_SFT;
4309+
len = le16_to_cpu(resp->resp_len);
43164310
if (len)
43174311
break;
43184312
/* on first few passes, just barely sleep */
@@ -4334,7 +4328,7 @@ static int bnxt_hwrm_do_send_msg(struct bnxt *bp, void *msg, u32 msg_len,
43344328
}
43354329

43364330
/* Last byte of resp contains valid bit */
4337-
valid = resp_addr + len - 1;
4331+
valid = ((u8 *)resp) + len - 1;
43384332
for (j = 0; j < HWRM_VALID_BIT_DELAY_USEC; j++) {
43394333
/* make sure we read from updated DMA memory */
43404334
dma_rmb();
@@ -9310,7 +9304,7 @@ static void __bnxt_close_nic(struct bnxt *bp, bool irq_re_init,
93109304
bnxt_free_skbs(bp);
93119305

93129306
/* Save ring stats before shutdown */
9313-
if (bp->bnapi)
9307+
if (bp->bnapi && irq_re_init)
93149308
bnxt_get_ring_stats(bp, &bp->net_stats_prev);
93159309
if (irq_re_init) {
93169310
bnxt_free_irq(bp);

drivers/net/ethernet/broadcom/bnxt/bnxt.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -656,11 +656,6 @@ struct nqe_cn {
656656
#define HWRM_CMD_TIMEOUT (bp->hwrm_cmd_timeout)
657657
#define HWRM_RESET_TIMEOUT ((HWRM_CMD_TIMEOUT) * 4)
658658
#define HWRM_COREDUMP_TIMEOUT ((HWRM_CMD_TIMEOUT) * 12)
659-
#define HWRM_RESP_ERR_CODE_MASK 0xffff
660-
#define HWRM_RESP_LEN_OFFSET 4
661-
#define HWRM_RESP_LEN_MASK 0xffff0000
662-
#define HWRM_RESP_LEN_SFT 16
663-
#define HWRM_RESP_VALID_MASK 0xff000000
664659
#define BNXT_HWRM_REQ_MAX_SIZE 128
665660
#define BNXT_HWRM_REQS_PER_PAGE (BNXT_PAGE_SIZE / \
666661
BNXT_HWRM_REQ_MAX_SIZE)

drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2012,11 +2012,12 @@ int bnxt_flash_package_from_file(struct net_device *dev, const char *filename,
20122012

20132013
bnxt_hwrm_fw_set_time(bp);
20142014

2015-
if (bnxt_find_nvram_item(dev, BNX_DIR_TYPE_UPDATE,
2016-
BNX_DIR_ORDINAL_FIRST, BNX_DIR_EXT_NONE,
2017-
&index, &item_len, NULL) != 0) {
2015+
rc = bnxt_find_nvram_item(dev, BNX_DIR_TYPE_UPDATE,
2016+
BNX_DIR_ORDINAL_FIRST, BNX_DIR_EXT_NONE,
2017+
&index, &item_len, NULL);
2018+
if (rc) {
20182019
netdev_err(dev, "PKG update area not created in nvram\n");
2019-
return -ENOBUFS;
2020+
return rc;
20202021
}
20212022

20222023
rc = request_firmware(&fw, filename, &dev->dev);

drivers/net/ethernet/freescale/dpaa/dpaa_eth.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2914,7 +2914,7 @@ static int dpaa_eth_probe(struct platform_device *pdev)
29142914
}
29152915

29162916
/* Do this here, so we can be verbose early */
2917-
SET_NETDEV_DEV(net_dev, dev);
2917+
SET_NETDEV_DEV(net_dev, dev->parent);
29182918
dev_set_drvdata(dev, net_dev);
29192919

29202920
priv = netdev_priv(net_dev);

drivers/net/ethernet/ibm/ibmvnic.c

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4678,12 +4678,10 @@ static void ibmvnic_handle_crq(union ibmvnic_crq *crq,
46784678
dev_err(dev, "Error %ld in VERSION_EXCHG_RSP\n", rc);
46794679
break;
46804680
}
4681-
dev_info(dev, "Partner protocol version is %d\n",
4682-
crq->version_exchange_rsp.version);
4683-
if (be16_to_cpu(crq->version_exchange_rsp.version) <
4684-
ibmvnic_version)
4685-
ibmvnic_version =
4681+
ibmvnic_version =
46864682
be16_to_cpu(crq->version_exchange_rsp.version);
4683+
dev_info(dev, "Partner protocol version is %d\n",
4684+
ibmvnic_version);
46874685
send_cap_queries(adapter);
46884686
break;
46894687
case QUERY_CAPABILITY_RSP:

drivers/net/ethernet/mellanox/mlx5/core/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ config MLX5_ESWITCH
8080

8181
config MLX5_TC_CT
8282
bool "MLX5 TC connection tracking offload support"
83-
depends on MLX5_CORE_EN && NET_SWITCHDEV && NF_FLOW_TABLE && NET_ACT_CT && NET_TC_SKB_EXT
83+
depends on MLX5_ESWITCH && NF_FLOW_TABLE && NET_ACT_CT && NET_TC_SKB_EXT
8484
default y
8585
help
8686
Say Y here if you want to support offloading connection tracking rules

0 commit comments

Comments
 (0)