Re: [PATCH v1 1/2] platform/x86: wmi: Break possible infinite loop when parsing GUID

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

 



Hi


2023. június 21., szerda 23:20 keltezéssel, Armin Wolf <W_Armin@xxxxxx> írta:

> [...]
> > @@ -895,11 +901,7 @@ static int wmi_dev_match(struct device *dev, struct device_driver *driver)
> >   		return 0;
> >
> >   	while (*id->guid_string) {
> > -		guid_t driver_guid;
> > -
> > -		if (WARN_ON(guid_parse(id->guid_string, &driver_guid)))
> 
> Hi,
> 
> just an idea: how about printing an error/debug message in case of an malformed GUID?
> This could be useful when searching for typos in GUIDs used by WMI drivers.
> [...]

Wouldn't it be better to change `__wmi_driver_register()` to check that?


Regards,
Barnabás Pőcze




[Index of Archives]     [Linux Kernel Development]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux