From: Andrea Righi Date: Mon, 28 Jun 2010 14:56:45 +0000 (+0200) Subject: USB: EHCI: fix NULL pointer dererence in HCDs that use HCD_LOCAL_MEM X-Git-Tag: v2.6.36-rc1~293^2~88 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4307a28eb0128417d9a2b9d858d2bce70ee5b383;p=pandora-kernel.git USB: EHCI: fix NULL pointer dererence in HCDs that use HCD_LOCAL_MEM If we use the HCD_LOCAL_MEM flag and dma_declare_coherent_memory() to enforce the host controller's local memory utilization we also need to disable native scatter-gather support, otherwise hcd_alloc_coherent() in map_urb_for_dma() is called with urb->transfer_buffer == NULL, that triggers a NULL pointer dereference. We can also consider to add a WARN_ON() and return an error code to better catch this problem in the future. At the moment no driver seems to hit this bug, so I should consider this a low-priority fix. Signed-off-by: Andrea Righi Acked-by: Alan Stern Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed