From patchwork Tue Sep 2 10:52:15 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Boaz Harrosh X-Patchwork-Id: 4824291 Return-Path: X-Original-To: patchwork-linux-nfs@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id C88CA9F377 for ; Tue, 2 Sep 2014 10:52:45 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E6C9720170 for ; Tue, 2 Sep 2014 10:52:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 191982014A for ; Tue, 2 Sep 2014 10:52:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753051AbaIBKwW (ORCPT ); Tue, 2 Sep 2014 06:52:22 -0400 Received: from mail-wg0-f43.google.com ([74.125.82.43]:34908 "EHLO mail-wg0-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753539AbaIBKwT (ORCPT ); Tue, 2 Sep 2014 06:52:19 -0400 Received: by mail-wg0-f43.google.com with SMTP id a1so6663383wgh.14 for ; Tue, 02 Sep 2014 03:52:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=NdjecbfHfHzwpLBpwmC/AX5lS1iv8ViOO8nj5Cm0Iqc=; b=chR75ub7pdFqtIw0yLtBHJiDfbQ/0X/+JwtblNEf772c5Of1X3s0Gt4R75OUbSJKKW 1VL4xzs4SVx5YsxdcZ0dxxC7pDc9fiuW7U2rnA0vZ0GP9bbQm3La3MxLf+xtunpnpqAf nku1LCWhAfusd7hT9/D1P/c9lPxuRcvoOSZ5Zjte5uAIZjAQkYpYYJ2r8s01bSxr1rZm YcSrwGWvzqr1twBe+kc7hmZ+MGV1BSd0KDdkqkdsp0VKu6pbssEFF3LASagR4W3bhDS5 9ncCGfrCJPFtJiwAJQKbUxLVdZZBF3GUTuQquD0KgdbzfRj0VC+dWw00Z/YgP9ZwBALF zulQ== X-Received: by 10.180.95.135 with SMTP id dk7mr7458036wib.68.1409655138182; Tue, 02 Sep 2014 03:52:18 -0700 (PDT) Received: from [10.0.0.5] ([207.232.55.62]) by mx.google.com with ESMTPSA id hy9sm8662844wjb.27.2014.09.02.03.52.16 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 02 Sep 2014 03:52:17 -0700 (PDT) Message-ID: <5405A15F.2060002@gmail.com> Date: Tue, 02 Sep 2014 13:52:15 +0300 From: Boaz Harrosh User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.7.0 MIME-Version: 1.0 To: Trond Myklebust , Shakil A Khan CC: Linux NFS Mailing List , Linux Kernel mailing list , "netdev@vger.kernel.org" , Peter Zijlstra , Paul McKenney , William Andros Adamson , Jeffrey Layton , "David S. Miller" , Bruce Fields Subject: Re: [PATCH] Next branch: authgss: authgss.c: Fix warnings for uninitizlized variable expire References: <1409571154-50408-1-git-send-email-shakilk1729@gmail.com> In-Reply-To: Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org X-Spam-Status: No, score=-8.5 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On 09/01/2014 04:50 PM, Trond Myklebust wrote: > On Mon, Sep 1, 2014 at 7:32 AM, Shakil A Khan wrote: >> Signed-off-by : Shakil A Khan >> --- >> 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() Cheers Boaz --- To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html 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);