aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
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 /include/linux
parentdrivers/misc: Move misplaced pci_dev_put's (diff)
downloadlinux-dev-348badf1e825323c419dd118f65783db0f7d2ec8.tar.xz
linux-dev-348badf1e825323c419dd118f65783db0f7d2ec8.zip
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 'include/linux')
0 files changed, 0 insertions, 0 deletions