aboutsummaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorHaavard Skinnemoen <[email protected]>2007-11-14 16:59:27 -0800
committerLinus Torvalds <[email protected]>2007-11-14 18:45:39 -0800
commit348badf1e825323c419dd118f65783db0f7d2ec8 (patch)
tree126cddb26c14233eaff8ddd6a240fe4ac69204ee /include/linux
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. [[email protected]: kill unnecessary client refcounting] Signed-off-by: Haavard Skinnemoen <[email protected]> Signed-off-by: Dan Williams <[email protected]> Signed-off-by: Shannon Nelson <[email protected]> Cc: <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'include/linux')
0 files changed, 0 insertions, 0 deletions