Re: [PATCH] xhci: fix null-pointer dereference when destroying half-built segment rings

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

 



>> Is it just
>> for (prev = *first; prev; prev = prev->next)
>>    xhci_segment_free(xhci, prev);
>> 
>> ?
> 
> Yeah, that seems cleaner.
> 
> Sarah Sharp

I can submit it that way if you want, but I would advise against it. This way you access the prev pointer after it has been freed already… that's probably not a problem in the current kernel, but it depends on how the underlying memory is managed and is generally just not a good idea in my opinion.--
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


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

  Powered by Linux