On 06/12/2018 16:57, Christoph Hellwig wrote: > Out of the three callers once insists on the scratch buffer, and the > others are fine with a new allocation. Switch those two to juse use > pci_alloc_consistent directly, and open code the scratch buffer > allocation in the remaining one. This avoids a case where we might > be doing a memory allocation under a spinlock with irqs disabled. Why not calling dma_alloc_coherent() directly instead of using the pci_alloc_consistent() wrapper? Johannes -- Johannes Thumshirn SUSE Labs Filesystems jthumshirn@xxxxxxx +49 911 74053 689 SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg GF: Felix Imendörffer, Jane Smithard, Graham Norton HRB 21284 (AG Nürnberg) Key fingerprint = EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76 0850