From: Wei Fang <wei.fang@nxp.com>
To: claudiu.manoil@nxp.com, vladimir.oltean@nxp.com,
xiaoning.wang@nxp.com, andrew+netdev@lunn.ch,
davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
pabeni@redhat.com
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
imx@lists.linux.dev
Subject: [PATCH v3 net 0/2] fix crash issue when setting MQPRIO for VFs
Date: Mon, 25 Nov 2024 17:07:17 +0800 [thread overview]
Message-ID: <20241125090719.2159124-1-wei.fang@nxp.com> (raw)
There is a crash issue when setting MQPRIO for ENETC VFs, the root casue
is that ENETC VFs don't like ENETC PFs, they don't have port registers,
so hw->port of VFs is NULL. However, this NULL pointer will be accessed
without any checks in enetc_mm_commit_preemptible_tcs() when configuring
MQPRIO for VFs. Therefore, two patches are added to fix this issue. The
first patch sets ENETC_SI_F_QBU flag only for SIs that support 802.1Qbu.
The second patch adds a check in enetc_change_preemptible_tcs() to ensure
that SIs that do not support 802.1Qbu do not configure preemptible TCs.
---
v1 Link: https://lore.kernel.org/imx/20241030082117.1172634-1-wei.fang@nxp.com/
v2 Link: https://lore.kernel.org/imx/20241104054309.1388433-1-wei.fang@nxp.com/
---
Vladimir Oltean (1):
net: enetc: read TSN capabilities from port register, not SI
Wei Fang (1):
net: enetc: Do not configure preemptible TCs if SIs do not support
drivers/net/ethernet/freescale/enetc/enetc.c | 12 +++---------
.../net/ethernet/freescale/enetc/enetc_hw.h | 6 +++---
.../net/ethernet/freescale/enetc/enetc_pf.c | 19 +++++++++++++++++++
3 files changed, 25 insertions(+), 12 deletions(-)
--
2.34.1
next reply other threads:[~2024-11-25 9:23 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-25 9:07 Wei Fang [this message]
2024-11-25 9:07 ` [PATCH v3 net 1/2] net: enetc: read TSN capabilities from port register, not SI Wei Fang
2024-11-25 17:44 ` Frank Li
2024-11-25 9:07 ` [PATCH v3 net 2/2] net: enetc: Do not configure preemptible TCs if SIs do not support Wei Fang
2024-11-25 17:42 ` Frank Li
2024-11-29 13:00 ` [PATCH v3 net 0/2] fix crash issue when setting MQPRIO for VFs patchwork-bot+netdevbpf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20241125090719.2159124-1-wei.fang@nxp.com \
--to=wei.fang@nxp.com \
--cc=andrew+netdev@lunn.ch \
--cc=claudiu.manoil@nxp.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=imx@lists.linux.dev \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=vladimir.oltean@nxp.com \
--cc=xiaoning.wang@nxp.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).