Skip to content
Commit 28ac8e03 authored by Colin Ian King's avatar Colin Ian King Committed by Vinod Koul
Browse files

dmaengine: idxd: Fix potential null dereference on pointer status

There are calls to idxd_cmd_exec that pass a null status pointer however
a recent commit has added an assignment to *status that can end up
with a null pointer dereference.  The function expects a null status
pointer sometimes as there is a later assignment to *status where
status is first null checked.  Fix the issue by null checking status
before making the assignment.

Addresses-Coverity: ("Explicit null dereferenced")
Fixes: 89e3becd

 ("dmaengine: idxd: check device state before issue command")
Signed-off-by: default avatarColin Ian King <colin.king@canonical.com>
Acked-by: default avatarDave Jiang <dave.jiang@intel.com>
Link: https://lore.kernel.org/r/20210415110654.1941580-1-colin.king@canonical.com
Signed-off-by: default avatarVinod Koul <vkoul@kernel.org>
parent 0b0f93cf
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