ethdev: validate input in register info
authorChengchang Tang <tangchengchang@huawei.com>
Fri, 2 Apr 2021 02:58:49 +0000 (10:58 +0800)
committerFerruh Yigit <ferruh.yigit@intel.com>
Wed, 7 Apr 2021 22:26:39 +0000 (00:26 +0200)
commit94af45f4005ee0c3152db45a3669bec5238a3c10
treea87e3b5c9d561babb6d36ec841c5dbc3bcb33531
parente2bd08d569d9821131d8e245446d24eaed145f21
ethdev: validate input in register info

This patch adds validity check of input pointer in regs dump API.

Fixes: 7a3f27cbf59b ("ethdev: add access to specific device info")
Fixes: 936eda25e8da ("net/hns3: support dump register")
Cc: stable@dpdk.org
Signed-off-by: Chengchang Tang <tangchengchang@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
drivers/net/hns3/hns3_regs.c
lib/librte_ethdev/rte_ethdev.c
lib/librte_ethdev/rte_ethdev.h