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: <5405A15F.2060002@gmail.com>
Date:	Tue, 02 Sep 2014 13:52:15 +0300
From:	Boaz Harrosh <openosd@...il.com>
To:	Trond Myklebust <trond.myklebust@...marydata.com>,
	Shakil A Khan <shakilk1729@...il.com>
CC:	Linux NFS Mailing List <linux-nfs@...r.kernel.org>,
	Linux Kernel mailing list <linux-kernel@...r.kernel.org>,
	"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
	Peter Zijlstra <peterz@...radead.org>,
	Paul McKenney <paulmck@...ux.vnet.ibm.com>,
	William Andros Adamson <andros@...app.com>,
	Jeffrey Layton <jlayton@...marydata.com>,
	"David S. Miller" <davem@...emloft.net>,
	Bruce Fields <bfields@...ldses.org>
Subject: Re: [PATCH] Next branch: authgss: authgss.c: Fix warnings for uninitizlized
 variable expire

On 09/01/2014 04:50 PM, Trond Myklebust wrote:
> On Mon, Sep 1, 2014 at 7:32 AM, Shakil A Khan <shakilk1729@...il.com> wrote:
>> Signed-off-by : Shakil A Khan <shakilk1729@...il.com>
>> ---
>>  net/sunrpc/auth_gss/auth_gss.c |    2 +-
>>  1 files changed, 1 insertions(+), 1 deletions(-)
>>
>> diff --git a/net/sunrpc/auth_gss/auth_gss.c b/net/sunrpc/auth_gss/auth_gss.c
>> index afb292c..bea0951 100644
>> --- a/net/sunrpc/auth_gss/auth_gss.c
>> +++ b/net/sunrpc/auth_gss/auth_gss.c
>> @@ -1387,7 +1387,7 @@ gss_key_timeout(struct rpc_cred *rc)
>>         struct gss_cred *gss_cred = container_of(rc, struct gss_cred, gc_base);
>>         struct gss_cl_ctx *ctx;
>>         unsigned long now = jiffies;
>> -       unsigned long expire;
>> +       unsigned long expire = 0;
>>
>>         rcu_read_lock();
>>         ctx = rcu_dereference(gss_cred->gc_ctx);
>> --
>> 1.7.1
> 
> That would be a compiler bug, not a kernel bug. The kernel code is
> perfectly correct as it stands, and will never access the
> uninitialised variable.
> 

Than you will need the infamous uninitialised_var()

diff --git a/net/sunrpc/auth_gss/auth_gss.c b/net/sunrpc/auth_gss/auth_gss.c
index afb292c..bea0951 100644
--- a/net/sunrpc/auth_gss/auth_gss.c
+++ b/net/sunrpc/auth_gss/auth_gss.c
@@ -1387,7 +1387,7 @@ gss_key_timeout(struct rpc_cred *rc)
 	struct gss_cred *gss_cred = container_of(rc, struct gss_cred, gc_base);
 	struct gss_cl_ctx *ctx;
 	unsigned long now = jiffies;
-	unsigned long expire;
+	unsigned long uninitialised_var(expire);
 
 	rcu_read_lock();
 	ctx = rcu_dereference(gss_cred->gc_ctx);

Cheers
Boaz
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ