Commit b8741496 authored by Qasim Ijaz's avatar Qasim Ijaz Committed by Joerg Roedel
Browse files

iommu: apple-dart: fix potential null pointer deref



If kzalloc() fails, accessing cfg->supports_bypass causes a null pointer dereference.

Fix by checking for NULL immediately after allocation and returning -ENOMEM.

Fixes: 3bc01028 ("iommu: apple-dart: Allow mismatched bypass support")
Signed-off-by: default avatarQasim Ijaz <qasdev00@gmail.com>
Reviewed-by: default avatarAlyssa Rosenzweig <alyssa@rosenzweig.io>
Link: https://lore.kernel.org/r/20250314230102.11008-1-qasdev00@gmail.com


Signed-off-by: default avatarJoerg Roedel <jroedel@suse.de>
parent 3bc01028
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment