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] [day] [month] [year] [list]
Date:	Tue, 03 Mar 2015 16:12:49 +0100
From:	Javier Martinez Canillas <javier.martinez@...labora.co.uk>
To:	Tejun Heo <tj@...nel.org>
CC:	Li Zefan <lizefan@...wei.com>, cgroups@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/1] cgroup: fix var may be used uninitialized warning

Hello Tejun,

On 03/03/2015 02:46 PM, Tejun Heo wrote:
> On Tue, Mar 03, 2015 at 09:59:47AM +0100, Javier Martinez Canillas wrote:
>> When building cgroup, GCC warns that the root variable
>> may be used uninitialized in the cgroup_mount function.
>> 
>> kernel/cgroup.c: In function ‘cgroup_mount’:
>> kernel/cgroup.c:1886:13: warning: ‘root’ may be used uninitialized in this function [-Wuninitialized]
>> kernel/cgroup.c:1742:22: note: ‘root’ was declared here
>> 
>> This can never happen because if the struct cgroup_root
>> can't be allocated, ret is set to -ENOMEM and the error
>> returned so the code using root is not reachable. But
>> set root to NULL just to silence the compiler warning.
> 
> Which compiler are you on?
>

Yeah, I noticed that I was using a pretty old 4.7.2 GCC on
that machine and the warning indeed is not seen with 4.9.1.

Sorry for the noise...

> Thanks.
>

Best regard,
Javier
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ