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]
Message-ID: <ZsfRqT9d6Qp_Pva5@google.com>
Date: Thu, 22 Aug 2024 17:02:49 -0700
From: Dmitry Torokhov <dmitry.torokhov@...il.com>
To: Zijun Hu <zijun_hu@...oud.com>
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	"Rafael J. Wysocki" <rafael@...nel.org>,
	linux-kernel@...r.kernel.org, Zijun Hu <quic_zijuhu@...cinc.com>,
	stable@...r.kernel.org
Subject: Re: [PATCH] driver core: Fix an uninitialized variable is used by
 __device_attach()

Hi,

On Fri, Aug 23, 2024 at 07:46:09AM +0800, Zijun Hu wrote:
> From: Zijun Hu <quic_zijuhu@...cinc.com>
> 
> An uninitialized variable @data.have_async may be used as analyzed
> by the following inline comments:
> 
> static int __device_attach(struct device *dev, bool allow_async)
> {
> 	// if @allow_async is true.
> 
> 	...
> 	struct device_attach_data data = {
> 		.dev = dev,
> 		.check_async = allow_async,
> 		.want_async = false,
> 	};
> 	// @data.have_async is not initialized.

No, in the presence of a structure initializer fields not explicitly
initialized will be set to 0 by the compiler.

There is no issue here.

Thanks.

-- 
Dmitry

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ