2023-10-05 16:44:34

by Peter Oberparleiter

[permalink] [raw]
Subject: Re: [PATCH] s390/cio: Fix a memleak in css_alloc_subchannel

On 21.09.2023 09:14, Dinghao Liu wrote:
> When dma_set_coherent_mask() fails, sch->lock has not been
> freed, which is allocated in css_sch_create_locks(), leading
> to a memleak.
>
> Fixes: 4520a91a976e ("s390/cio: use dma helpers for setting masks")
> Signed-off-by: Dinghao Liu <[email protected]>

Looks good to me.

Reviewed-by: Peter Oberparleiter <[email protected]>

--
Peter Oberparleiter
Linux on IBM Z Development - IBM Germany R&D


2023-10-10 10:32:51

by Vasily Gorbik

[permalink] [raw]
Subject: Re: [PATCH] s390/cio: Fix a memleak in css_alloc_subchannel

On Thu, Oct 05, 2023 at 05:12:54PM +0200, Peter Oberparleiter wrote:
> On 21.09.2023 09:14, Dinghao Liu wrote:
> > When dma_set_coherent_mask() fails, sch->lock has not been
> > freed, which is allocated in css_sch_create_locks(), leading
> > to a memleak.
> >
> > Fixes: 4520a91a976e ("s390/cio: use dma helpers for setting masks")
> > Signed-off-by: Dinghao Liu <[email protected]>
>
> Looks good to me.
>
> Reviewed-by: Peter Oberparleiter <[email protected]>

Applied, thank you.