“ce5a983191ce466cbe35e240ac09e28cca3e50c9”上不存在“net/git@gitcode.net:openeuler/kernel.git”
  • R
    DMA-API: sound: fix dma mask handling in a lot of drivers · c9bd5e69
    Russell King 提交于
    This code sequence is unsafe in modules:
    
    static u64 mask = DMA_BIT_MASK(something);
    ...
    	if (!dev->dma_mask)
    		dev->dma_mask = &mask;
    
    as if a module is reloaded, the mask will be pointing at the original
    module's mask address, and this can lead to oopses.  Moreover, they
    all follow this with:
    
    	if (!dev->coherent_dma_mask)
    		dev->coherent_dma_mask = mask;
    
    where 'mask' is the same value as the statically defined mask, and this
    bypasses the architecture's check on whether the DMA mask is possible.
    
    Fix these issues by using the new dma_coerce_coherent_and_mask()
    function.
    Acked-by: NMark Brown <broonie@linaro.org>
    Acked-by: NTakashi Iwai <tiwai@suse.de>
    Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
    c9bd5e69
bf5xx-i2s-pcm.c 9.9 KB
反馈
建议
客服 返回
顶部