From d98400512a8528c506e81a6f0faaba83c487dd5b Mon Sep 17 00:00:00 2001 From: Timothy McDaniel Date: Thu, 5 Nov 2020 15:22:53 -0600 Subject: [PATCH] event/dlb: fix memory overrun in PF reset Fix memory corruption bug caused by passing address of a 16b value, instead of address of a 32b value. Coverity issue: 363715 Fixes: 1998008 ("event/dlb: add eventdev probe") Signed-off-by: Timothy McDaniel --- drivers/event/dlb/pf/dlb_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/event/dlb/pf/dlb_main.c b/drivers/event/dlb/pf/dlb_main.c index 87ab8ddfff..17e671e1df 100644 --- a/drivers/event/dlb/pf/dlb_main.c +++ b/drivers/event/dlb/pf/dlb_main.c @@ -250,13 +250,13 @@ dlb_pf_reset(struct dlb_dev *dlb_dev) { int msix_cap_offset, err_cap_offset, acs_cap_offset, wait_count; uint16_t dev_ctl_word, dev_ctl2_word, lnk_word, lnk_word2; - uint16_t rt_ctl_word, pri_reqs_dword, pri_ctrl_word; + uint16_t rt_ctl_word, pri_ctrl_word; struct rte_pci_device *pdev = dlb_dev->pdev; uint16_t devsta_busy_word, devctl_word; int pcie_cap_offset, pri_cap_offset; uint16_t slt_word, slt_word2, cmd; int ret = 0, i = 0; - uint32_t dword[16]; + uint32_t dword[16], pri_reqs_dword; off_t off; /* Save PCI config state */ -- 2.20.1