Commit b874149
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: 3bc0102 ("iommu: apple-dart: Allow mismatched bypass support")
Signed-off-by: Qasim Ijaz <[email protected]>
Reviewed-by: Alyssa Rosenzweig <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Joerg Roedel <[email protected]>1 parent 3bc0102 commit b874149
1 file changed
+2
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
797 | 797 | | |
798 | 798 | | |
799 | 799 | | |
800 | | - | |
| 800 | + | |
| 801 | + | |
801 | 802 | | |
802 | 803 | | |
803 | 804 | | |
804 | | - | |
805 | | - | |
806 | 805 | | |
807 | 806 | | |
808 | 807 | | |
| |||
0 commit comments