dma-coherent: fix possible panic when releasing chunk
authorSri Krishna chowdary <schowdary@nvidia.com>
Tue, 22 Mar 2016 04:25:13 +0000 (09:25 +0530)
committerManish Tuteja <mtuteja@nvidia.com>
Wed, 12 Apr 2017 18:28:45 +0000 (11:28 -0700)
commit2512205c8bc2599275bfb9fd044b700e10b8dae6
treeb1d991838b2481cd3303e2795f873cad3db8db08
parent7b2c24c40c66f207bb492c56b443dcfff94a46f2
dma-coherent: fix possible panic when releasing chunk

When more than cma_chunk_size is being released then dma
release callback panics. Treat it as a valid release as long
as it lies within the current size of the cma region shared
with the OS.

bug 1715544
bug 200290806

Change-Id: Iee513067f00d2f0c91ca1811f58382b7724b528e
Signed-off-by: Sri Krishna chowdary <schowdary@nvidia.com>
Reviewed-on: http://git-master/r/1113872
(cherry picked from commit b7b3f787bfb885678c6470f00671247743cf0aaa)
Reviewed-on: http://git-master/r/1325120
Reviewed-by: Michael Frydrych <mfrydrych@nvidia.com>
Tested-by: Michael Frydrych <mfrydrych@nvidia.com>
Reviewed-by: Vinayak Pane <vpane@nvidia.com>
(cherry picked from commit af2c2cd6b076fb03026c2cdb73b433431549779d)
Reviewed-on: http://git-master/r/1459993
Tested-by: Vinayak Pane <vpane@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Manish Tuteja <mtuteja@nvidia.com>
drivers/base/dma-coherent.c