lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 11 Apr 2016 11:38:53 +0000
From:	"Du, Changbin" <changbin.du@...el.com>
To:	Felipe Balbi <balbi@...nel.org>
CC:	"gregkh@...uxfoundation.org" <gregkh@...uxfoundation.org>,
	"linux-usb@...r.kernel.org" <linux-usb@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH] usb: dwc3: free dwc->regset on dwc3_debugfs_exit

> 
> >> > +	dwc->regset = NULL;
> >>
> >> setting regset to NULL is unnecessary. We only call dwc3_debugfs_exit()
> >> when removing the driver.
> >>
> >> --
> >> Balbi
> > I'd like keep this line even it is unnecessary, because It is a good habit to
> > Avoid wild pointers. Just like the dwc->root = NULL.
> 
> there won't be any wild pointers here, we'll free struct dwc3 *dwc itself.
> 
> --
> Balbi
I agree the dwc will be freed in current code. But the 'free' logical is out
of the debugfs code. They should be treat as some logical independent. Per
this point, I still think set pointer to null is not bad. For example, if dwc3 core
code invoke dwc3_debugfs_exit twice by mistake(just an example case, not
really), then no crash/impact for the second call.

Thanks,
Du, Changbin

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ