Hi Sarah, Yes that caused an oops and the patch fixed it. Thanks, John > -----Original Message----- > From: Sarah Sharp [mailto:sarah.a.sharp@xxxxxxxxxxxxxxx] > Sent: Tuesday, November 03, 2009 11:44 AM > To: John Youn > Cc: linux-usb@xxxxxxxxxxxxxxx > Subject: [PATCH] xhci: Fix scratchpad deallocation. > > The scratchpad_free() function uses xhci->page_size to free some memory > with pci_free_consistent(). However, the page_size is set to zero > before > the call, causing kernel oopses on driver unload. Call > scratchpad_free() > before setting xhci->page_size to zero. > > Signed-off-by: Sarah Sharp <sarah.a.sharp@xxxxxxxxxxxxxxx> > Cc: John Youn <John.Youn@xxxxxxxxxxxx> > --- > > John, can you confirm that you get kernel oops on module unload, and > that this patch fixes them? I don't currently have access to an xHCI > host that needs scratchpad allocation. > > > drivers/usb/host/xhci-mem.c | 2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > > diff --git a/drivers/usb/host/xhci-mem.c b/drivers/usb/host/xhci-mem.c > index 19e1091..129ad7a 100644 > --- a/drivers/usb/host/xhci-mem.c > +++ b/drivers/usb/host/xhci-mem.c > @@ -852,9 +852,9 @@ void xhci_mem_cleanup(struct xhci_hcd *xhci) > xhci->dcbaa, xhci->dcbaa->dma); > xhci->dcbaa = NULL; > > + scratchpad_free(xhci); > xhci->page_size = 0; > xhci->page_shift = 0; > - scratchpad_free(xhci); > } > > int xhci_mem_init(struct xhci_hcd *xhci, gfp_t flags) > -- > 1.6.0.4 -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html