]> git.baikalelectronics.ru Git - kernel.git/commit
crypto: crypto4xx - fix double-free in crypto4xx_destroy_sdr
authorChristian Lamparter <chunkeey@gmail.com>
Thu, 31 Oct 2019 16:14:38 +0000 (17:14 +0100)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 8 Nov 2019 15:15:52 +0000 (23:15 +0800)
commitc6c458db8d31890fc74c9bb28989a7ffc3fe3bfd
treee4d16341a1b9a7a48a458a20c8a9148e5450e403
parent9f9855dc62c83bd8c56be621089d59466aa26af1
crypto: crypto4xx - fix double-free in crypto4xx_destroy_sdr

This patch fixes a crash that can happen during probe
when the available dma memory is not enough (this can
happen if the crypto4xx is built as a module).

The descriptor window mapping would end up being free'd
twice, once in crypto4xx_build_pdr() and the second time
in crypto4xx_destroy_sdr().

Fixes: e7935b2d4a89 ("crypto: crypto4xx - fix crypto4xx_build_pdr, crypto4xx_build_sdr leak")
Cc: <stable@vger.kernel.org>
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/amcc/crypto4xx_core.c