summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorHaavard Skinnemoen <hskinnemoen@atmel.com>2007-11-14 16:59:27 -0800
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-11-14 18:45:39 -0800
commit348badf1e825323c419dd118f65783db0f7d2ec8 (patch)
tree126cddb26c14233eaff8ddd6a240fe4ac69204ee /net
parent90d8dabf74179e6615bd4688a118e12ec29ab7aa (diff)
dmaengine: fix broken device refcounting
When a DMA device is unregistered, its reference count is decremented twice for each channel: Once dma_class_dev_release() and once in dma_chan_cleanup(). This may result in the DMA device driver's remove() function completing before all channels have been cleaned up, causing lots of use-after-free fun. Fix it by incrementing the device's reference count twice for each channel during registration. [dan.j.williams@intel.com: kill unnecessary client refcounting] Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com> Signed-off-by: Shannon Nelson <shannon.nelson@intel.com> Cc: <stable@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'net')
0 files changed, 0 insertions, 0 deletions