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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> -----Original Message-----
> From: Bjørn Mork [mailto:bjorn@xxxxxxx]
> Sent: Thursday, April 04, 2013 10:01 AM
> To: Sarah Sharp
> Cc: Aguirre Rodriguez, Sergio A; linux-usb@xxxxxxxxxxxxxxx
> Subject: Re: [PATCH] xhci: prevent from potential null pointer dereference
> on failed init
> 
> Sarah Sharp <sarah.a.sharp@xxxxxxxxxxxxxxx> writes:
> 
> > Thanks for catching this!  However, the inline comment is a bit much
> > for a simple NULL pointer check.  Can you remove the comment and
> > resubmit this patch?
> 
> And maybe handle failure to initialize cancel_cmd_list as well? It has the
> same problem.
> 
> But wouldn't it be better to move the list initializations to the beginning of
> xhci_mem_init instead of relying on additional tests for a NULL next pointer?

Yeah, that actually makes more sense to me.

I'll do that in the next revision.

Regards,
Sergio

> 
> 
> Bjørn
��.n��������+%������w��{.n�����{���)��jg��������ݢj����G�������j:+v���w�m������w�������h�����٥





[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux