projects
/
linux-2.6-microblaze.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fc27ab4
)
net: airoha: Always check return value from airoha_ppe_foe_get_entry()
author
Lorenzo Bianconi
<lorenzo@kernel.org>
Wed, 18 Jun 2025 07:37:40 +0000
(09:37 +0200)
committer
Jakub Kicinski
<kuba@kernel.org>
Thu, 19 Jun 2025 15:34:13 +0000
(08:34 -0700)
airoha_ppe_foe_get_entry routine can return NULL, so check the returned
pointer is not NULL in airoha_ppe_foe_flow_l2_entry_update()
Fixes:
b81e0f2b58be3
("net: airoha: Add FLOW_CLS_STATS callback support")
Reviewed-by: Simon Horman <horms@kernel.org>
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Link:
https://patch.msgid.link/20250618-check-ret-from-airoha_ppe_foe_get_entry-v2-1-068dcea3cc66@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/airoha/airoha_ppe.c
patch
|
blob
|
history
diff --git
a/drivers/net/ethernet/airoha/airoha_ppe.c
b/drivers/net/ethernet/airoha/airoha_ppe.c
index
9067d2f
..
0e217ac
100644
(file)
--- a/
drivers/net/ethernet/airoha/airoha_ppe.c
+++ b/
drivers/net/ethernet/airoha/airoha_ppe.c
@@
-809,8
+809,10
@@
airoha_ppe_foe_flow_l2_entry_update(struct airoha_ppe *ppe,
int idle;
hwe = airoha_ppe_foe_get_entry(ppe, iter->hash);
- ib1 = READ_ONCE(hwe->ib1);
+ if (!hwe)
+ continue;
+ ib1 = READ_ONCE(hwe->ib1);
state = FIELD_GET(AIROHA_FOE_IB1_BIND_STATE, ib1);
if (state != AIROHA_FOE_STATE_BIND) {
iter->hash = 0xffff;