USB: EHCI: fix DMA deallocation bug
This patch (as1440) fixes a bug in ehci-hcd. ehci->periodic_size is used to compute the size in a dma_alloc_coherent() call, but then it gets changed later on. As a result, the corresponding call to dma_free_coherent() passes a different size from the original allocation. Fix the problem by adjusting ehci->periodic_size before carrying out any of the memory allocations. Signed-off-by: NAlan Stern <stern@rowland.harvard.edu> Tested-by: NLarry Finger <Larry.Finger@lwfinger.net> CC: David Brownell <david-b@pacbell.net> CC: <stable@kernel.org> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
Showing
想要评论请 注册 或 登录