From: Larry Finger Date: Thu, 5 Nov 2009 16:37:03 +0000 (-0600) Subject: USB: Check results of dma_map_single X-Git-Tag: v2.6.33-rc1~315^2~75 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=85e034fdff2af6befc55904f3ab9cc5aa31be8fe;p=pandora-kernel.git USB: Check results of dma_map_single In map_urb_for_dma(), the DMA address returned by dma_map_single() is not checked to determine if it is legal. This lack of checking contributed to a problem with the libertas wireless driver (http://marc.info/?l=linux-wireless&m=125695331205062&w=2). The difficulty was not detected until the buffer was unmapped. By this time memory corruption had occurred. The situation is fixed by testing the returned DMA address, and returning -EAGAIN if the address is invalid. Signed-off-by: Larry Finger Cc: Alan Stern Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed