In the non-INVARIANTS case, return 0 rather than stack garbage if
reading an ivar fails (in the INVARIANTS case, we still panic).
MFC after: 1 week
Sponsored by: Klara, Inc.
Sponsored by: NetApp, Inc.
Differential D54078
bus: Return 0 if reading an ivar fails Authored by des on Thu, Dec 4, 9:01 PM. Tags None Referenced Files
Subscribers
Details
In the non-INVARIANTS case, return 0 rather than stack garbage if MFC after: 1 week
Diff Detail
Event TimelineComment Actions Hmmm, I wonder if 0 is the right thing vs something like 0xdeadc0de. We have a few explicit IVAR handlers that intentionally return a default value (e.g. acpi_get_handle()) and those do tend to be zero (and in those cases we don't KASSERT). I have a patch in a branch to add a new one like that for ThunderBolt PCI bridges even. 0 is probably fine as a default, but @imp might also have an opinion. |