Skip to content
Commit 862aecbd authored by YANG LI's avatar YANG LI Committed by Jakub Kicinski
Browse files

ibmvnic: fix: NULL pointer dereference.

The error is due to dereference a null pointer in function
reset_one_sub_crq_queue():

if (!scrq) {
    netdev_dbg(adapter->netdev,
               "Invalid scrq reset. irq (%d) or msgs(%p).\n",
		scrq->irq, scrq->msgs);
		return -EINVAL;
}

If the expression is true, scrq must be a null pointer and cannot
dereference.

Fixes: 9281cf2d

 ("ibmvnic: avoid memset null scrq msgs")
Signed-off-by: default avatarYANG LI <abaci-bugfix@linux.alibaba.com>
Reported-by: default avatarAbaci <abaci@linux.alibaba.com>
Acked-by: default avatarLijun Pan <ljp@linux.ibm.com>
Link: https://lore.kernel.org/r/1609312994-121032-1-git-send-email-abaci-bugfix@linux.alibaba.com
Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent e4da63cd
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment