Skip to content

Commit

Permalink
net/ena: fix crash with unsupported device argument
Browse files Browse the repository at this point in the history
[ upstream commit 9f220a9 ]

As the documentation of rte_kvargs_parse() states, the valid_keys
argument must be NULL terminated. Lack of this feature may cause
segmentation fault if the passed devarg will be different then the
supported value.

Fixes: 8a7a73f ("net/ena: support large LLQ headers")

Signed-off-by: Michal Krawczyk <mk@semihalf.com>
Reviewed-by: Igor Chauskin <igorch@amazon.com>
Reviewed-by: Shay Agroskin <shayagr@amazon.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
  • Loading branch information
Gerwand authored and steevenlee committed Jun 8, 2021
1 parent a5c0cca commit 967dcfb
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/net/ena/ena_ethdev.c
Expand Up @@ -2876,6 +2876,7 @@ static int ena_parse_devargs(struct ena_adapter *adapter,
{
static const char * const allowed_args[] = {
ENA_DEVARG_LARGE_LLQ_HDR,
NULL,
};
struct rte_kvargs *kvlist;
int rc;
Expand Down

0 comments on commit 967dcfb

Please sign in to comment.