RE: VME-driver: Memory leak in module 'vme.c', function 'vme_dma_free'

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

 



> On Mon, Jun 03, 2013 at 09:57:22AM +0000, De Roo, Steven wrote:
> > Dear Martyn,
> > 
> > I think there is a memory leak in module 'vme.c', function 'vme_dma_free'.
> > 'kfree(resource)' is not called after unlocking the mutex...
>
> [ snip]
>
> > PS: I found out about this after performing lots of DMA-transfers, 
> > which finally lead to out-of-memory problems and a system freeze...
> > Using 'slabinfo', I can now see that the problem is gone with this fix.
>
> It seems like you are using an out of tree driver?  The
> vme_dma_free() function is never called so adding a kfree() shouldn't change anything.  But it would make it match vme_lm_free() and vme_master_free() so it's probably the right thing I suppose.
>
> regards,
> dan Carpenter


The vme_dma_free is indeed never called in vme.c/vme_tsi148.c, but in my own driver which uses the DMA-access-functions.
Meanwhile, I see that Martyn has posted my suggested patch (thanks Martyn!)

Regards,
Steven De Roo
_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel




[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux