]> Git Repo - linux.git/commit
dma-direct: Fix potential NULL pointer dereference
authorThomas Tai <[email protected]>
Thu, 17 Sep 2020 16:43:03 +0000 (18:43 +0200)
committerChristoph Hellwig <[email protected]>
Thu, 17 Sep 2020 16:43:20 +0000 (18:43 +0200)
commitf959dcd6ddfd29235030e8026471ac1b022ad2b0
treeb3bb71e9171c97f693240bdeb3e9ad2f0a5d580c
parenta92df4f62fda02e6b141e2b0bb52ccc486264b1c
dma-direct: Fix potential NULL pointer dereference

When booting the kernel v5.9-rc4 on a VM, the kernel would panic when
printing a warning message in swiotlb_map(). The dev->dma_mask must not
be a NULL pointer when calling the dma mapping layer. A NULL pointer
check can potentially avoid the panic.

Signed-off-by: Thomas Tai <[email protected]>
Reviewed-by: Konrad Rzeszutek Wilk <[email protected]>
Signed-off-by: Christoph Hellwig <[email protected]>
include/linux/dma-direct.h
kernel/dma/mapping.c
This page took 0.047331 seconds and 4 git commands to generate.