+ dmaengine-fix-memory-leak-in-dma_async_device_unregister.patch added to -mm tree

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

 



The patch titled
     dmaengine: fix memory leak in dma_async_device_unregister()
has been added to the -mm tree.  Its filename is
     dmaengine-fix-memory-leak-in-dma_async_device_unregister.patch

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/SubmitChecklist when testing your code ***

See http://userweb.kernel.org/~akpm/stuff/added-to-mm.txt to find
out what to do about this

The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/

------------------------------------------------------
Subject: dmaengine: fix memory leak in dma_async_device_unregister()
From: Anatolij Gustschin <agust@xxxxxxx>

While debugging a dma driver I noticed a memleak after unloading the
driver module.

Caught by kmemleak.

Signed-off-by: Anatolij Gustschin <agust@xxxxxxx>
Cc: Maciej Sosnowski <maciej.sosnowski@xxxxxxxxx>
Cc: Dan Williams <dan.j.williams@xxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 drivers/dma/dmaengine.c |    1 +
 1 file changed, 1 insertion(+)

diff -puN drivers/dma/dmaengine.c~dmaengine-fix-memory-leak-in-dma_async_device_unregister drivers/dma/dmaengine.c
--- a/drivers/dma/dmaengine.c~dmaengine-fix-memory-leak-in-dma_async_device_unregister
+++ a/drivers/dma/dmaengine.c
@@ -826,6 +826,7 @@ void dma_async_device_unregister(struct 
 		chan->dev->chan = NULL;
 		mutex_unlock(&dma_list_mutex);
 		device_unregister(&chan->dev->device);
+		free_percpu(chan->local);
 	}
 }
 EXPORT_SYMBOL(dma_async_device_unregister);
_

Patches currently in -mm which might be from agust@xxxxxxx are

origin.patch
dmaengine-fix-memory-leak-in-dma_async_device_unregister.patch

--
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux