mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git
synced 2026-04-27 03:49:57 -04:00
drm/nouveau/secboot: fix NULL pointer dereference
The msgqueue pointer validity should be checked by its owner, not by the msgqueue code itself to avoid this situation. Signed-off-by: Alexandre Courbot <acourbot@nvidia.com> Reported-by: Julia Lawall <julia.lawall@lip6.fr> Signed-off-by: Dave Airlie <airlied@redhat.com>
This commit is contained in:
committed by
Dave Airlie
parent
aa7fc0ca75
commit
b7d6c8db49
@@ -59,6 +59,13 @@ static void
|
||||
nvkm_sec2_recv(struct work_struct *work)
|
||||
{
|
||||
struct nvkm_sec2 *sec2 = container_of(work, typeof(*sec2), work);
|
||||
|
||||
if (!sec2->queue) {
|
||||
nvkm_warn(&sec2->engine.subdev,
|
||||
"recv function called while no firmware set!\n");
|
||||
return;
|
||||
}
|
||||
|
||||
nvkm_msgqueue_recv(sec2->queue);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user