Thread (23 messages) 23 messages, 8 authors, 2021-09-29

Re: [PATCH] net: mdiobus: Fix memory leak in __mdiobus_register

From: Pavel Skripkin <hidden>
Date: 2021-09-28 11:04:55
Also in: lkml

On 9/28/21 13:55, Dan Carpenter wrote:
On Tue, Sep 28, 2021 at 01:46:56PM +0300, Pavel Skripkin wrote:
quoted
On 9/28/21 13:39, Dan Carpenter wrote:
quoted
No, the syzbot link was correct.
Link is correct, but Yanfei's patch does not fix this bug. Syzbot reported
leak, that you described below, not the Yanfei one.
I promise you that Yanfei's link was correct.  That bug was in
__devm_mdiobus_register().  It's a totally separate issue.
I must be missing something, or we are talking about different links :)

Let me explain why I think, that Yanfei's patch cannot fix leak reported 
by syzkaller [1] (I hope, we are talking about this link)


Yanfei has changed this code part:

	err = device_register(&bus->dev);
	if (err) {
(*)		pr_err("mii_bus %s failed to register\n", bus->id);
		return -EINVAL;
	}

So, if executing gets into this branch we should see error message (*), 
right? There is no such message into log file on bug report page [1], so 
how is it possible?




[1] 
https://syzkaller.appspot.com/bug?id=fa99459691911a0369622248e0f4e3285fcedd97
	

With regards,
Pavel Skripkin
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help