Skip to content

Commit 33b4013

Browse files
committed
Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
Pull networking fixes from David Miller: 1) Use after free in rxrpc_put_local(), from David Howells. 2) Fix 64-bit division error in mlxsw, from Nathan Chancellor. 3) Make sure we clear various bits of TCP state in response to tcp_disconnect(). From Eric Dumazet. 4) Fix netlink attribute policy in cls_rsvp, from Eric Dumazet. 5) txtimer must be deleted in stmmac suspend(), from Nicolin Chen. 6) Fix TC queue mapping in bnxt_en driver, from Michael Chan. 7) Various netdevsim fixes from Taehee Yoo (use of uninitialized data, snapshot panics, stack out of bounds, etc.) 8) cls_tcindex changes hash table size after allocating the table, fix from Cong Wang. 9) Fix regression in the enforcement of session ID uniqueness in l2tp. We only have to enforce uniqueness for IP based tunnels not UDP ones. From Ridge Kennedy. * git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (46 commits) gtp: use __GFP_NOWARN to avoid memalloc warning l2tp: Allow duplicate session creation with UDP r8152: Add MAC passthrough support to new device net_sched: fix an OOB access in cls_tcindex qed: Remove set but not used variable 'p_link' tc-testing: add missing 'nsPlugin' to basic.json tc-testing: fix eBPF tests failure on linux fresh clones net: hsr: fix possible NULL deref in hsr_handle_frame() netdevsim: remove unused sdev code netdevsim: use __GFP_NOWARN to avoid memalloc warning netdevsim: use IS_ERR instead of IS_ERR_OR_NULL for debugfs netdevsim: fix stack-out-of-bounds in nsim_dev_debugfs_init() netdevsim: fix panic in nsim_dev_take_snapshot_write() netdevsim: disable devlink reload when resources are being used netdevsim: fix using uninitialized resources bnxt_en: Fix TC queue mapping. bnxt_en: Fix logic that disables Bus Master during firmware reset. bnxt_en: Fix RDMA driver failure with SRIOV after firmware reset. bnxt_en: Refactor logic to re-enable SRIOV after firmware reset detected. net: stmmac: Delete txtimer in suspend() ...
2 parents d60ddd2 + bd5cd35 commit 33b4013

47 files changed

Lines changed: 569 additions & 246 deletions

Some content is hidden

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

‎Documentation/networking/nf_flowtable.txt‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ flowtable and add one rule to your forward chain.
7676

7777
table inet x {
7878
flowtable f {
79-
hook ingress priority 0 devices = { eth0, eth1 };
79+
hook ingress priority 0; devices = { eth0, eth1 };
8080
}
8181
chain y {
8282
type filter hook forward priority 0; policy accept;

‎MAINTAINERS‎

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7658,9 +7658,8 @@ S: Orphan
76587658
F: drivers/net/usb/hso.c
76597659

76607660
HSR NETWORK PROTOCOL
7661-
M: Arvid Brodin <arvid.brodin@alten.se>
76627661
L: netdev@vger.kernel.org
7663-
S: Maintained
7662+
S: Orphan
76647663
F: net/hsr/
76657664

76667665
HT16K33 LED CONTROLLER DRIVER
@@ -8909,8 +8908,10 @@ L: isdn4linux@listserv.isdn4linux.de (subscribers-only)
89098908
L: netdev@vger.kernel.org
89108909
W: http://www.isdn4linux.de
89118910
S: Maintained
8912-
F: drivers/isdn/mISDN
8913-
F: drivers/isdn/hardware
8911+
F: drivers/isdn/mISDN/
8912+
F: drivers/isdn/hardware/
8913+
F: drivers/isdn/Kconfig
8914+
F: drivers/isdn/Makefile
89148915

89158916
ISDN/CMTP OVER BLUETOOTH
89168917
M: Karsten Keil <isdn@linux-pingi.de>

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

Lines changed: 24 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7893,7 +7893,7 @@ static void bnxt_setup_msix(struct bnxt *bp)
78937893
int tcs, i;
78947894

78957895
tcs = netdev_get_num_tc(dev);
7896-
if (tcs > 1) {
7896+
if (tcs) {
78977897
int i, off, count;
78987898

78997899
for (i = 0; i < tcs; i++) {
@@ -9241,6 +9241,17 @@ void bnxt_half_close_nic(struct bnxt *bp)
92419241
bnxt_free_mem(bp, false);
92429242
}
92439243

9244+
static void bnxt_reenable_sriov(struct bnxt *bp)
9245+
{
9246+
if (BNXT_PF(bp)) {
9247+
struct bnxt_pf_info *pf = &bp->pf;
9248+
int n = pf->active_vfs;
9249+
9250+
if (n)
9251+
bnxt_cfg_hw_sriov(bp, &n, true);
9252+
}
9253+
}
9254+
92449255
static int bnxt_open(struct net_device *dev)
92459256
{
92469257
struct bnxt *bp = netdev_priv(dev);
@@ -9259,15 +9270,10 @@ static int bnxt_open(struct net_device *dev)
92599270
bnxt_hwrm_if_change(bp, false);
92609271
} else {
92619272
if (test_and_clear_bit(BNXT_STATE_FW_RESET_DET, &bp->state)) {
9262-
if (BNXT_PF(bp)) {
9263-
struct bnxt_pf_info *pf = &bp->pf;
9264-
int n = pf->active_vfs;
9265-
9266-
if (n)
9267-
bnxt_cfg_hw_sriov(bp, &n, true);
9268-
}
9269-
if (!test_bit(BNXT_STATE_IN_FW_RESET, &bp->state))
9273+
if (!test_bit(BNXT_STATE_IN_FW_RESET, &bp->state)) {
92709274
bnxt_ulp_start(bp, 0);
9275+
bnxt_reenable_sriov(bp);
9276+
}
92719277
}
92729278
bnxt_hwmon_open(bp);
92739279
}
@@ -9307,10 +9313,6 @@ static void __bnxt_close_nic(struct bnxt *bp, bool irq_re_init,
93079313
bnxt_debug_dev_exit(bp);
93089314
bnxt_disable_napi(bp);
93099315
del_timer_sync(&bp->timer);
9310-
if (test_bit(BNXT_STATE_IN_FW_RESET, &bp->state) &&
9311-
pci_is_enabled(bp->pdev))
9312-
pci_disable_device(bp->pdev);
9313-
93149316
bnxt_free_skbs(bp);
93159317

93169318
/* Save ring stats before shutdown */
@@ -10096,9 +10098,16 @@ static void bnxt_reset(struct bnxt *bp, bool silent)
1009610098
static void bnxt_fw_reset_close(struct bnxt *bp)
1009710099
{
1009810100
bnxt_ulp_stop(bp);
10101+
/* When firmware is fatal state, disable PCI device to prevent
10102+
* any potential bad DMAs before freeing kernel memory.
10103+
*/
10104+
if (test_bit(BNXT_STATE_FW_FATAL_COND, &bp->state))
10105+
pci_disable_device(bp->pdev);
1009910106
__bnxt_close_nic(bp, true, false);
1010010107
bnxt_clear_int_mode(bp);
1010110108
bnxt_hwrm_func_drv_unrgtr(bp);
10109+
if (pci_is_enabled(bp->pdev))
10110+
pci_disable_device(bp->pdev);
1010210111
bnxt_free_ctx_mem(bp);
1010310112
kfree(bp->ctx);
1010410113
bp->ctx = NULL;
@@ -10831,6 +10840,8 @@ static void bnxt_fw_reset_task(struct work_struct *work)
1083110840
smp_mb__before_atomic();
1083210841
clear_bit(BNXT_STATE_IN_FW_RESET, &bp->state);
1083310842
bnxt_ulp_start(bp, rc);
10843+
if (!rc)
10844+
bnxt_reenable_sriov(bp);
1083410845
bnxt_dl_health_recovery_done(bp);
1083510846
bnxt_dl_health_status_update(bp, true);
1083610847
rtnl_unlock();

‎drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,9 +171,9 @@ static int otx2_hw_get_mac_addr(struct otx2_nic *pfvf,
171171
}
172172

173173
msghdr = otx2_mbox_get_rsp(&pfvf->mbox.mbox, 0, &req->hdr);
174-
if (!msghdr) {
174+
if (IS_ERR(msghdr)) {
175175
otx2_mbox_unlock(&pfvf->mbox);
176-
return -ENOMEM;
176+
return PTR_ERR(msghdr);
177177
}
178178
rsp = (struct nix_get_mac_addr_rsp *)msghdr;
179179
ether_addr_copy(netdev->dev_addr, rsp->mac_addr);

‎drivers/net/ethernet/mellanox/mlxsw/spectrum_qdisc.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -614,7 +614,7 @@ mlxsw_sp_qdisc_tbf_rate_kbps(struct tc_tbf_qopt_offload_replace_params *p)
614614
/* TBF interface is in bytes/s, whereas Spectrum ASIC is configured in
615615
* Kbits/s.
616616
*/
617-
return p->rate.rate_bytes_ps / 1000 * 8;
617+
return div_u64(p->rate.rate_bytes_ps, 1000) * 8;
618618
}
619619

620620
static int

‎drivers/net/ethernet/pensando/ionic/ionic_if.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -866,7 +866,7 @@ struct ionic_rxq_comp {
866866
#define IONIC_RXQ_COMP_CSUM_F_VLAN 0x40
867867
#define IONIC_RXQ_COMP_CSUM_F_CALC 0x80
868868
u8 pkt_type_color;
869-
#define IONIC_RXQ_COMP_PKT_TYPE_MASK 0x0f
869+
#define IONIC_RXQ_COMP_PKT_TYPE_MASK 0x7f
870870
};
871871

872872
enum ionic_pkt_type {

‎drivers/net/ethernet/qlogic/qed/qed_cxt.c‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1398,14 +1398,11 @@ void qed_qm_init_pf(struct qed_hwfn *p_hwfn,
13981398
{
13991399
struct qed_qm_info *qm_info = &p_hwfn->qm_info;
14001400
struct qed_qm_pf_rt_init_params params;
1401-
struct qed_mcp_link_state *p_link;
14021401
struct qed_qm_iids iids;
14031402

14041403
memset(&iids, 0, sizeof(iids));
14051404
qed_cxt_qm_iids(p_hwfn, &iids);
14061405

1407-
p_link = &QED_LEADING_HWFN(p_hwfn->cdev)->mcp_info->link_output;
1408-
14091406
memset(&params, 0, sizeof(params));
14101407
params.port_id = p_hwfn->port_id;
14111408
params.pf_id = p_hwfn->rel_pf_id;

‎drivers/net/ethernet/qlogic/qed/qed_dev.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3114,6 +3114,7 @@ int qed_hw_init(struct qed_dev *cdev, struct qed_hw_init_params *p_params)
31143114
if (!p_hwfn->fw_overlay_mem) {
31153115
DP_NOTICE(p_hwfn,
31163116
"Failed to allocate fw overlay memory\n");
3117+
rc = -ENOMEM;
31173118
goto load_err;
31183119
}
31193120

‎drivers/net/ethernet/stmicro/stmmac/stmmac_main.c‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4974,6 +4974,7 @@ int stmmac_suspend(struct device *dev)
49744974
{
49754975
struct net_device *ndev = dev_get_drvdata(dev);
49764976
struct stmmac_priv *priv = netdev_priv(ndev);
4977+
u32 chan;
49774978

49784979
if (!ndev || !netif_running(ndev))
49794980
return 0;
@@ -4987,6 +4988,9 @@ int stmmac_suspend(struct device *dev)
49874988

49884989
stmmac_disable_all_queues(priv);
49894990

4991+
for (chan = 0; chan < priv->plat->tx_queues_to_use; chan++)
4992+
del_timer_sync(&priv->tx_queue[chan].txtimer);
4993+
49904994
/* Stop TX/RX DMA */
49914995
stmmac_stop_all_dma(priv);
49924996

‎drivers/net/gtp.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -767,12 +767,12 @@ static int gtp_hashtable_new(struct gtp_dev *gtp, int hsize)
767767
int i;
768768

769769
gtp->addr_hash = kmalloc_array(hsize, sizeof(struct hlist_head),
770-
GFP_KERNEL);
770+
GFP_KERNEL | __GFP_NOWARN);
771771
if (gtp->addr_hash == NULL)
772772
return -ENOMEM;
773773

774774
gtp->tid_hash = kmalloc_array(hsize, sizeof(struct hlist_head),
775-
GFP_KERNEL);
775+
GFP_KERNEL | __GFP_NOWARN);
776776
if (gtp->tid_hash == NULL)
777777
goto err1;
778778

0 commit comments

Comments
 (0)