[v3] mbuf: fix dump of dynamic fields and flags
Checks
Commit Message
From: Alexander Bechikov <asb.tyum@gmail.com>
The dump of dynamic fields and flags fails if the shm is already
allocated. Add a check to fix the issue.
Cc: stable@dpdk.org
Fixes: d4902ed31c63 ("mbuf: check shared memory before dumping dynamic space")
Signed-off-by: Alexander Bechikov <asb.tyum@gmail.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
---
Hi Alexander,
Sorry for late feedback, I forgot to reply to your v2.
I'm resending your fix with the 2 patches merged together, so it
can be included in 21.11.
Thanks,
Olivier
v3:
* Merge the 2 patches from v2 and add a commit log
v2:
* Drop changes with log message from v1, because rte_errno is not always set
---
lib/mbuf/rte_mbuf_dyn.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Comments
24/11/2021 13:57, Olivier Matz:
> From: Alexander Bechikov <asb.tyum@gmail.com>
>
> The dump of dynamic fields and flags fails if the shm is already
> allocated. Add a check to fix the issue.
>
> Cc: stable@dpdk.org
> Fixes: d4902ed31c63 ("mbuf: check shared memory before dumping dynamic space")
>
> Signed-off-by: Alexander Bechikov <asb.tyum@gmail.com>
> Acked-by: Olivier Matz <olivier.matz@6wind.com>
> ---
> Hi Alexander,
>
> Sorry for late feedback, I forgot to reply to your v2.
> I'm resending your fix with the 2 patches merged together, so it
> can be included in 21.11.
Applied for 21.11, thanks.
@@ -531,7 +531,7 @@ void rte_mbuf_dyn_dump(FILE *out)
size_t i;
rte_mcfg_tailq_write_lock();
- if (init_shared_mem() < 0) {
+ if (shm == NULL && init_shared_mem() < 0) {
rte_mcfg_tailq_write_unlock();
return;
}