diff options
| author | Lv Yunlong <lyl2019@mail.ustc.edu.cn> | 2021-04-02 10:13:48 -0700 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-05-22 10:38:23 +0200 |
| commit | 8cbd176bf6ae5262c1e3f41459c50490b37ba698 (patch) | |
| tree | eec5f33b58e5e662b5ff4099488dd6a02d6bd7d3 /drivers/usb/class/cdc-acm.c | |
| parent | 1e56446729adc3937f1a343f419c6d45acb2e02e (diff) | |
crypto: qat - Fix a double free in adf_create_ring
[ Upstream commit f7cae626cabb3350b23722b78fe34dd7a615ca04 ]
In adf_create_ring, if the callee adf_init_ring() failed, the callee will
free the ring->base_addr by dma_free_coherent() and return -EFAULT. Then
adf_create_ring will goto err and the ring->base_addr will be freed again
in adf_cleanup_ring().
My patch sets ring->base_addr to NULL after the first freed to avoid the
double free.
Fixes: a672a9dc872ec ("crypto: qat - Intel(R) QAT transport code")
Signed-off-by: Lv Yunlong <lyl2019@mail.ustc.edu.cn>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers/usb/class/cdc-acm.c')
0 files changed, 0 insertions, 0 deletions
