Re: [PATCH] async_pq_val: fix DMA memory leak

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



[ adding Vinod ]

On Tue, Oct 4, 2016 at 1:17 PM, Justin Maggard <jmaggard10@xxxxxxxxx> wrote:
> Add missing dmaengine_unmap_put(), so we don't OOM during RAID6 sync.
>
> Fixes: 1786b943dad0 ("async_pq_val: convert to dmaengine_unmap_data")
> Signed-off-by: Justin Maggard <jmaggard@xxxxxxxxxxx>

Reviewed-by: Dan Williams <dan.j.williams@xxxxxxxxx>
Cc: <stable@xxxxxxxxxxxxxxx>


> ---
>  crypto/async_tx/async_pq.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/crypto/async_tx/async_pq.c b/crypto/async_tx/async_pq.c
> index 08b3ac6..f83de99 100644
> --- a/crypto/async_tx/async_pq.c
> +++ b/crypto/async_tx/async_pq.c
> @@ -368,8 +368,6 @@ async_syndrome_val(struct page **blocks, unsigned int offset, int disks,
>
>                 dma_set_unmap(tx, unmap);
>                 async_tx_submit(chan, tx, submit);
> -
> -               return tx;
>         } else {
>                 struct page *p_src = P(blocks, disks);
>                 struct page *q_src = Q(blocks, disks);
> @@ -424,9 +422,11 @@ async_syndrome_val(struct page **blocks, unsigned int offset, int disks,
>                 submit->cb_param = cb_param_orig;
>                 submit->flags = flags_orig;
>                 async_tx_sync_epilog(submit);
> -
> -               return NULL;
> +               tx = NULL;
>         }
> +       dmaengine_unmap_put(unmap);
> +
> +       return tx;
>  }
>  EXPORT_SYMBOL_GPL(async_syndrome_val);
>
> --
> 2.10.1
>
--
To unsubscribe from this list: send the line "unsubscribe dmaengine" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux PCI]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux