Re: [PATCH] of/address: Fix of_node memory leak in of_dma_is_coherent

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

 



On Tue, 10 Nov 2020 15:28:25 +1300, Evan Nimmo wrote:
> Commit dabf6b36b83a ("of: Add OF_DMA_DEFAULT_COHERENT & select it on
> powerpc") added a check to of_dma_is_coherent which returns early
> if OF_DMA_DEFAULT_COHERENT is enabled. This results in the of_node_put()
> being skipped causing a memory leak. Moved the of_node_get() below this
> check so we now we only get the node if OF_DMA_DEFAULT_COHERENT is not
> enabled.
> 
> Fixes: dabf6b36b83a ("of: Add OF_DMA_DEFAULT_COHERENT & select it on
> powerpc")
> 
> Signed-off-by: Evan Nimmo <evan.nimmo@xxxxxxxxxxxxxxxxxxx>
> ---
>  drivers/of/address.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 

Applied, thanks!



[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux