[PATCH v4 030/103] net/ice/base: enable RDMA Act-Act unload paths

Anatoly Burakov anatoly.burakov at intel.com
Wed Jun 26 13:41:18 CEST 2024


From: Jacob Keller <jacob.e.keller at intel.com>

In certain unload conditions the non-standard paths to breaking down the bond
supporting resources need special considerations in that there could be nodes
moved out of the tree and this can cause a NULL pointer to be passed into the
find node by
teid function.

Add in a NULL pointer check to handle these situations

Signed-off-by: Jacob Keller <jacob.e.keller at intel.com>
Signed-off-by: Ian Stokes <ian.stokes at intel.com>
---
 drivers/net/ice/base/ice_sched.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/net/ice/base/ice_sched.c b/drivers/net/ice/base/ice_sched.c
index 74d57329da..af8f8cc7a9 100644
--- a/drivers/net/ice/base/ice_sched.c
+++ b/drivers/net/ice/base/ice_sched.c
@@ -56,6 +56,9 @@ ice_sched_find_node_by_teid(struct ice_sched_node *start_node, u32 teid)
 {
 	u16 i;
 
+	if (!start_node)
+		return NULL;
+
 	/* The TEID is same as that of the start_node */
 	if (ICE_TXSCHED_GET_NODE_TEID(start_node) == teid)
 		return start_node;
-- 
2.43.0



More information about the dev mailing list