Commit 1339b4ec authored by Rakesh Babu Saladi's avatar Rakesh Babu Saladi Committed by Guo Mengqi
Browse files

octeontx2-af: Fix possible null pointer dereference.

mainline inclusion
from mainline-v5.15
commit c2d4c543
category: bugfix
bugzilla: https://gitee.com/src-openeuler/kernel/issues/I9RDAK
CVE: CVE-2021-47484

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=c2d4c543f74c90f883e8ec62a31973ae8807d354



--------------------------------

This patch fixes possible null pointer dereference in file
"rvu_debugfs.c"

Fixes: 8756828a ("octeontx2-af: Add NPA aura and pool contexts to debugfs")
Signed-off-by: default avatarRakesh Babu Saladi <rsaladi2@marvell.com>
Signed-off-by: default avatarSubbaraya Sundeep <sbhatta@marvell.com>
Signed-off-by: default avatarSunil Goutham <sgoutham@marvell.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>

Conflicts:
	drivers/net/ethernet/marvell/octeontx2/af/rvu_nix.c
[File introduced in 5.11]
Signed-off-by: default avatarGuo Mengqi <guomengqi3@huawei.com>
parent 83e8197d
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -438,7 +438,7 @@ static ssize_t rvu_dbg_qsize_write(struct file *filp,
	if (cmd_buf)
		ret = -EINVAL;

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