https://github.com/torvalds/linux
Revision 298a96c12b2d8fd845ae0c2c21c0a1c0b470f99e authored by Ville Syrjälä on 25 October 2015, 21:11:43 UTC, committed by Thomas Gleixner on 26 October 2015, 05:59:36 UTC
Commit 6894258eda2f broke drivers that pass NULL as the device pointer
to dma_alloc. The reason is that arch_dma_alloc_attrs() now calls
dma_alloc_coherent_gfp_flags() which in turn calls
dma_alloc_coherent_mask(), where the device pointer is dereferenced
unconditionally.

Fix things by moving the ISA DMA fallback device assignment before the
call to dma_alloc_coherent_gfp_flags().

Fixes: 6894258eda2f ("dma-mapping: consolidate dma_{alloc,free}_{attrs,coherent}")
Reported-and-tested-by: Meelis Roos <mroos@linux.ee>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Cc: Christoph Hellwig <hch@lst.de>
Link: http://lkml.kernel.org/r/1445807503-8920-1-git-send-email-ville.syrjala@linux.intel.com
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
1 parent 32b8819
History
Tip revision: 298a96c12b2d8fd845ae0c2c21c0a1c0b470f99e authored by Ville Syrjälä on 25 October 2015, 21:11:43 UTC
x86/dma-mapping: Fix arch_dma_alloc_attrs() oops with NULL dev
Tip revision: 298a96c
File Mode Size
apparmor
integrity
keys
selinux
smack
tomoyo
yama
Kconfig -rw-r--r-- 5.6 KB
Makefile -rw-r--r-- 900 bytes
commoncap.c -rw-r--r-- 31.2 KB
device_cgroup.c -rw-r--r-- 21.0 KB
inode.c -rw-r--r-- 6.5 KB
lsm_audit.c -rw-r--r-- 9.9 KB
min_addr.c -rw-r--r-- 1.3 KB
security.c -rw-r--r-- 53.1 KB

back to top