fbarray: fix metadata dump
PATCH 1/1 fbarray: fix metadata dump
If the passed fbarray is invalid, its lock was not taken before releasing.
Fixes c44d09811b40 ("eal: add shared indexed file-backed array")
Signed-off-by David Marchand <[email protected]>
--- lib/eal/common/eal_common_fbarray.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
lib/eal/common/eal_common_fbarray.c +1 -2
@@ -1482,7 +1482,7 @@ rte_fbarray_dump_metadata(struct rte_fbarray *arr, FILE *f)if (fully_validate (arr->name, arr->elt_sz, arr->len)) {fprintf (f,"Invalid file-backed array\n" ); - goto out; +return ; }/* prevent array from changing under us */
@@ -1496,6 +1496,5 @@ rte_fbarray_dump_metadata(struct rte_fbarray *arr, FILE *f)for (i =0 ; i < msk->n_masks; i++)fprintf (f,"msk idx %i: 0x%016" PRIx64"\n" , i, msk->data[i]); -out:rte_rwlock_read_unlock (&arr->rwlock); }
Signature · 1 line
2.39.0
David Marchand
AppliedQuoted 8 lines · David Marchand
If the passed fbarray is invalid, its lock was not taken before releasing.
Fixes c44d09811b40 ("eal: add shared indexed file-backed array")Signed-off-by David Marchand <[email protected]>
Applied.
Signature · 1 line
David Marchand