Message ID | 20210111171802.1826324-1-ciorneiioana@gmail.com (mailing list archive) |
---|---|
State | Accepted |
Commit | 848c1903d35e2eb4fdf8b1a0a6721876e8c88e5d |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | [net-next] dpaa2-mac: fix the remove path for non-MAC interfaces | expand |
Context | Check | Description |
---|---|---|
netdev/cover_letter | success | Link |
netdev/fixes_present | success | Link |
netdev/patch_count | success | Link |
netdev/tree_selection | success | Clearly marked for net-next |
netdev/subject_prefix | success | Link |
netdev/cc_maintainers | warning | 1 maintainers not CCed: ruxandra.radulescu@nxp.com |
netdev/source_inline | success | Was 0 now: 0 |
netdev/verify_signedoff | success | Link |
netdev/module_param | success | Was 0 now: 0 |
netdev/build_32bit | success | Errors and warnings before: 0 this patch: 0 |
netdev/kdoc | success | Errors and warnings before: 0 this patch: 0 |
netdev/verify_fixes | success | Link |
netdev/checkpatch | success | total: 0 errors, 0 warnings, 0 checks, 9 lines checked |
netdev/build_allmodconfig_warn | success | Errors and warnings before: 0 this patch: 0 |
netdev/header_inline | success | Link |
netdev/stable | success | Stable not CCed |
Hello: This patch was applied to netdev/net-next.git (refs/heads/master): On Mon, 11 Jan 2021 19:18:02 +0200 you wrote: > From: Ioana Ciornei <ioana.ciornei@nxp.com> > > Check if the interface is indeed connected to a MAC before trying to > close the DPMAC object representing it. Without this check we end up > working with a NULL pointer. > > Fixes: d87e606373f6 ("dpaa2-mac: export MAC counters even when in TYPE_FIXED") > Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com> > > [...] Here is the summary with links: - [net-next] dpaa2-mac: fix the remove path for non-MAC interfaces https://git.kernel.org/netdev/net-next/c/848c1903d35e You are awesome, thank you! -- Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html
diff --git a/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c b/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c index dd00c5de2115..7cb286e53369 100644 --- a/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c +++ b/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c @@ -4150,6 +4150,9 @@ static void dpaa2_eth_disconnect_mac(struct dpaa2_eth_priv *priv) if (dpaa2_eth_is_type_phy(priv)) dpaa2_mac_disconnect(priv->mac); + if (!dpaa2_eth_has_mac(priv)) + return; + dpaa2_mac_close(priv->mac); kfree(priv->mac); priv->mac = NULL;