npa_aura_pool_init() allocates the pool init mbox message twice on
non-CN20K platforms. The if/else block at line 106-111 allocates via
the model-specific branch, but the original unconditional allocation
at line 112 was not removed when the CN20K branch was added. This
overwrites pool_init_req, and the orphaned first message is sent to
the AF with uninitialized aura_id, ctype, and op fields, which can
trigger any undesired behavior on CN10K.
Remove the duplicate allocation.
Fixes: 143a419edf35 ("common/cnxk: use new NPA aq enq mbox for CN20K")
Cc: [email protected]
Cc: [email protected]
Signed-off-by: Amiya Ranjan Mohakud <[email protected]>
---
drivers/common/cnxk/roc_npa.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/common/cnxk/roc_npa.c b/drivers/common/cnxk/roc_npa.c
index 4a3e96a97a..87f7637e9f 100644
--- a/drivers/common/cnxk/roc_npa.c
+++ b/drivers/common/cnxk/roc_npa.c
@@ -110,7 +110,6 @@ npa_aura_pool_init(struct mbox *m_box, uint32_t aura_id,
struct npa_aura_s *aura
} else {
pool_init_req = mbox_alloc_msg_npa_aq_enq(mbox);
}
- pool_init_req = mbox_alloc_msg_npa_aq_enq(mbox);
if (pool_init_req == NULL)
goto exit;
pool_init_req->aura_id = aura_id;
--
2.39.5 (Apple Git-154)