linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* suspected null-pointer-reference problem for to_swnode
@ 2021-10-25 14:03 YE Chengfeng
  2021-10-25 16:40 ` andriy.shevchenko
  0 siblings, 1 reply; 5+ messages in thread
From: YE Chengfeng @ 2021-10-25 14:03 UTC (permalink / raw)
  To: heikki.krogerus, andriy.shevchenko; +Cc: linux-kernel

Hi, 

https://github.com/torvalds/linux/blob/master/drivers/base/swnode.c#L405

We notice that the return pointer of to_swnode is null check in some case, while in some case is not. For example, at line 416, the return pointer is null-check, but in line 405 is not. We want to know whether it would be a potential null pointer dereference problem, in the case that null-check is missing.

This problem is detected by our experimental static analysis tool, we are not familiar with the source code and it could just be a false positive. We send this email in case this is a real problem. Would you like to spare some time to have a look at it?

Thanks so much,
Chengfeng

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-10-26 17:27 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-25 14:03 suspected null-pointer-reference problem for to_swnode YE Chengfeng
2021-10-25 16:40 ` andriy.shevchenko
2021-10-26 10:12   ` 回复: " YE Chengfeng
2021-10-26 15:11   ` Sakari Ailus
2021-10-26 16:33     ` andriy.shevchenko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).