ACPI ID list termination

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

 



I have stumbled over __acpi_match_device() implementation and noticed
different types of termination of the struct acpi_device_id (ACPI ID
list), i.e. '{ }' vs. '{"", 0}'.

As I read the code of the above mentioned function, I see that it
dereferences the id field without NULL check. This means we are quite
lucky (somebody before guarantees the match) we have no crash here.

So, my question is, if my analysis of the situation is correct, we
need to patch ACPI glue code to be NULL-aware and not rely on any
guarantees, because it seems to me fragile. In that case we may unify
ID list termination as it's done in most cases, i.e. '{ }'.

Opinions, comments?

-- 
With Best Regards,
Andy Shevchenko



[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux