Skip to content

Commit c2d4c54

Browse files
Rakesh Babu Saladidavem330
authored andcommitted
octeontx2-af: Fix possible null pointer dereference.
This patch fixes possible null pointer dereference in files "rvu_debugfs.c" and "rvu_nix.c" Fixes: 8756828 ("octeontx2-af: Add NPA aura and pool contexts to debugfs") Fixes: 9a946de ("octeontx2-af: Modify nix_vtag_cfg mailbox to support TX VTAG entries") Signed-off-by: Rakesh Babu Saladi <[email protected]> Signed-off-by: Subbaraya Sundeep <[email protected]> Signed-off-by: Sunil Goutham <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent e77bcdd commit c2d4c54

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

drivers/net/ethernet/marvell/octeontx2/af/rvu_debugfs.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -578,7 +578,7 @@ static ssize_t rvu_dbg_qsize_write(struct file *filp,
578578
if (cmd_buf)
579579
ret = -EINVAL;
580580

581-
if (!strncmp(subtoken, "help", 4) || ret < 0) {
581+
if (ret < 0 || !strncmp(subtoken, "help", 4)) {
582582
dev_info(rvu->dev, "Use echo <%s-lf > qsize\n", blk_string);
583583
goto qsize_write_done;
584584
}

drivers/net/ethernet/marvell/octeontx2/af/rvu_nix.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2507,6 +2507,9 @@ static void nix_free_tx_vtag_entries(struct rvu *rvu, u16 pcifunc)
25072507
return;
25082508

25092509
nix_hw = get_nix_hw(rvu->hw, blkaddr);
2510+
if (!nix_hw)
2511+
return;
2512+
25102513
vlan = &nix_hw->txvlan;
25112514

25122515
mutex_lock(&vlan->rsrc_lock);

0 commit comments

Comments
 (0)