]> git.baikalelectronics.ru Git - kernel.git/commit
USB: EHCI: fix DMA deallocation bug
authorAlan Stern <stern@rowland.harvard.edu>
Thu, 6 Jan 2011 15:17:09 +0000 (10:17 -0500)
committerGreg Kroah-Hartman <gregkh@suse.de>
Sun, 23 Jan 2011 02:36:43 +0000 (18:36 -0800)
commit804258b5c65e17297273582cf162a7641b1ff68a
tree884e842e5ad6dbfd8035f8615106936d68c48a30
parentd71452d5ed42b579a2e5c7954123e6660d79a058
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: Alan Stern <stern@rowland.harvard.edu>
Tested-by: Larry Finger <Larry.Finger@lwfinger.net>
CC: David Brownell <david-b@pacbell.net>
CC: <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/host/ehci-hcd.c