RE: [PATCH v2] xhci: prevent from potential null pointer dereference on failed init

2013-04-04 Thread Aguirre Rodriguez, Sergio A
Hi David, Thanks for the review. > -Original Message- > From: Cohen, David A > Sent: Thursday, April 04, 2013 10:03 AM > To: Aguirre Rodriguez, Sergio A > Cc: linux-usb@vger.kernel.org; Sarah Sharp; Kanigeri, Hari K > Subject: Re: [PATCH v2] xhci: prevent from pote

Re: [PATCH v2] xhci: prevent from potential null pointer dereference on failed init

2013-04-04 Thread David Cohen
Hi Sergio, On 04/04/2013 09:57 AM, Sergio Aguirre wrote: It is possible that we fail on xhci_mem_init, just before doing the INIT_LIST_HEAD, and calling xhci_mem_cleanup. Problem is that, the list_for_each_entry_safe macro, dereferences next assuming is not NULL (which is the case for a uniniti