Re: [PATCH] usb: core: Null deref in kernel with USB webcams.

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

 



On Thu, Nov 12, 2020 at 06:15:08PM +0000, John Boero wrote:
> Then why does line 278 right below it check for NULL?

Are you asking about line 278 in drivers/usb/core/usb.c?  The statement 
which says:

	if (!config)
		return NULL;

This is because it is perfectly valid for config to be NULL at this 
point.  But it is not valid for dev to be NULL.  If dev is NULL then 
there is a bug in the caller.

Alan Stern



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

  Powered by Linux