Attention is currently required from: Arthur Heymans, Christian Walter, Johnny Lin, Jonathan Zhang, Lean Sheng Tan, Patrick Rudolph, Shuo Liu, Tim Chu.
Nico Huber has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/81957?usp=email )
Change subject: device_util: Handle domain device in dev_get_domain
......................................................................
Patch Set 1:
(1 comment)
File src/device/device_util.c:
https://review.coreboot.org/c/coreboot/+/81957/comment/d1f9e43f_61702822 :
PS1, Line 255: dev
I suppose the NULL-deref should not be a problem in the previous codes? Since it is blocked by the w […]
The original code checked `dev` and `dev->upstream`:
```
while (dev && dev->upstream && ...
```
But then `dev` got overwritten:
```
dev = dev->upstream->dev;
```
and the new `dev` was dereferenced unchecked:
```
if (dev->path...
```
I don't know if it matters. A valid device tree should never have a NULL
there. But the same applies to `dev->upstream` and we check it too. It
was just inconsistent to check one but not the other.
--
To view, visit
https://review.coreboot.org/c/coreboot/+/81957?usp=email
To unsubscribe, or for help writing mail filters, visit
https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: main
Gerrit-Change-Id: I3a278a8f573de95406ee256fba17767def4ad75d
Gerrit-Change-Number: 81957
Gerrit-PatchSet: 1
Gerrit-Owner: Shuo Liu
shuo.liu@intel.com
Gerrit-Reviewer: Arthur Heymans
arthur@aheymans.xyz
Gerrit-Reviewer: Christian Walter
christian.walter@9elements.com
Gerrit-Reviewer: Felix Held
felix-coreboot@felixheld.de
Gerrit-Reviewer: Johnny Lin
Johnny_Lin@wiwynn.com
Gerrit-Reviewer: Jonathan Zhang
jon.zhixiong.zhang@gmail.com
Gerrit-Reviewer: Lean Sheng Tan
sheng.tan@9elements.com
Gerrit-Reviewer: Nico Huber
nico.h@gmx.de
Gerrit-Reviewer: Patrick Rudolph
patrick.rudolph@9elements.com
Gerrit-Reviewer: Tim Chu
Tim.Chu@quantatw.com
Gerrit-CC: build bot (Jenkins)
no-reply@coreboot.org
Gerrit-Attention: Patrick Rudolph
patrick.rudolph@9elements.com
Gerrit-Attention: Jonathan Zhang
jon.zhixiong.zhang@gmail.com
Gerrit-Attention: Johnny Lin
Johnny_Lin@wiwynn.com
Gerrit-Attention: Christian Walter
christian.walter@9elements.com
Gerrit-Attention: Shuo Liu
shuo.liu@intel.com
Gerrit-Attention: Arthur Heymans
arthur@aheymans.xyz
Gerrit-Attention: Lean Sheng Tan
sheng.tan@9elements.com
Gerrit-Attention: Tim Chu
Tim.Chu@quantatw.com
Gerrit-Comment-Date: Thu, 18 Apr 2024 21:11:29 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Nico Huber
nico.h@gmx.de
Comment-In-Reply-To: Shuo Liu
shuo.liu@intel.com
Gerrit-MessageType: comment