Re: [PATCH] dmaengine: avoid map_cnt overflow with CONFIG_DMA_ENGINE_RAID

2018-02-04 Thread Vinod Koul
On Mon, Jan 08, 2018 at 10:50:50AM -0500, Zi Yan wrote: > From: Zi Yan > > When CONFIG_DMA_ENGINE_RAID is enabled, unmap pool size can reach to > 256. But in struct dmaengine_unmap_data, map_cnt is only u8, wrapping > to 0, if the unmap pool is maximally used. This triggers BUG() when > struct dm

Re: [PATCH] dmaengine: avoid map_cnt overflow with CONFIG_DMA_ENGINE_RAID

2018-01-16 Thread Zi Yan
On 12 Jan 2018, at 11:56, Vinod Koul wrote: On Mon, Jan 08, 2018 at 10:50:50AM -0500, Zi Yan wrote: From: Zi Yan When CONFIG_DMA_ENGINE_RAID is enabled, unmap pool size can reach to 256. But in struct dmaengine_unmap_data, map_cnt is only u8, wrapping to 0, if the unmap pool is maximally used

Re: [PATCH] dmaengine: avoid map_cnt overflow with CONFIG_DMA_ENGINE_RAID

2018-01-12 Thread Vinod Koul
On Mon, Jan 08, 2018 at 10:50:50AM -0500, Zi Yan wrote: > From: Zi Yan > > When CONFIG_DMA_ENGINE_RAID is enabled, unmap pool size can reach to > 256. But in struct dmaengine_unmap_data, map_cnt is only u8, wrapping > to 0, if the unmap pool is maximally used. This triggers BUG() when > struct dm

[PATCH] dmaengine: avoid map_cnt overflow with CONFIG_DMA_ENGINE_RAID

2018-01-08 Thread Zi Yan
From: Zi Yan When CONFIG_DMA_ENGINE_RAID is enabled, unmap pool size can reach to 256. But in struct dmaengine_unmap_data, map_cnt is only u8, wrapping to 0, if the unmap pool is maximally used. This triggers BUG() when struct dmaengine_unmap_data is freed. Use u16 to fix the problem. Signed-off