summaryrefslogtreecommitdiff
path: root/crypto
diff options
context:
space:
mode:
authorHaavard Skinnemoen <hskinnemoen@atmel.com>2007-11-15 00:59:27 (GMT)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-11-15 02:45:39 (GMT)
commit348badf1e825323c419dd118f65783db0f7d2ec8 (patch)
tree126cddb26c14233eaff8ddd6a240fe4ac69204ee /crypto
parent90d8dabf74179e6615bd4688a118e12ec29ab7aa (diff)
downloadlinux-fsl-qoriq-348badf1e825323c419dd118f65783db0f7d2ec8.tar.xz
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 'crypto')
0 files changed, 0 insertions, 0 deletions