public inbox for linux-unionfs@vger.kernel.org
 help / color / mirror / Atom feed
From: kbuild test robot <fengguang.wu@intel.com>
To: Miklos Szeredi <mszeredi@redhat.com>
Cc: kbuild-all@01.org, linux-unionfs@vger.kernel.org
Subject: [miklos-vfs:readlink 8/11] fs/proc/namespaces.c:93:9: warning: 'res' may be used uninitialized in this function
Date: Sat, 10 Dec 2016 03:46:21 +0800	[thread overview]
Message-ID: <201612100310.AMlgHF4D%fengguang.wu@intel.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 2865 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/vfs.git readlink
head:   aec1408b51975ee937ae79994bd3807c55ec09ca
commit: 68177fb03256addf021583df6324a032662c7904 [8/11] vfs: convert ->readlink to same signature as ->get_link
config: i386-randconfig-r0-201649 (attached as .config)
compiler: gcc-5 (Debian 5.4.1-2) 5.4.1 20160904
reproduce:
        git checkout 68177fb03256addf021583df6324a032662c7904
        # save the attached .config to linux build tree
        make ARCH=i386 

Note: it may well be a FALSE warning. FWIW you are at least aware of it now.
http://gcc.gnu.org/wiki/Better_Uninitialized_Warnings

All warnings (new ones prefixed by >>):

   fs/proc/namespaces.c: In function 'proc_ns_readlink':
>> fs/proc/namespaces.c:93:9: warning: 'res' may be used uninitialized in this function [-Wmaybe-uninitialized]
     return res;
            ^

vim +/res +93 fs/proc/namespaces.c

68177fb0 Miklos Szeredi    2016-12-09   77  
68177fb0 Miklos Szeredi    2016-12-09   78  		res = ERR_PTR(-ENOMEM);
68177fb0 Miklos Szeredi    2016-12-09   79  		if (!name)
68177fb0 Miklos Szeredi    2016-12-09   80  			goto out_put;
68177fb0 Miklos Szeredi    2016-12-09   81  
68177fb0 Miklos Szeredi    2016-12-09   82  		err = ns_get_name(name, PROC_NS_LINK_MAX, task, ns_ops);
68177fb0 Miklos Szeredi    2016-12-09   83  		if (err < 0) {
68177fb0 Miklos Szeredi    2016-12-09   84  			kfree(name);
68177fb0 Miklos Szeredi    2016-12-09   85  			res = ERR_PTR(err);
68177fb0 Miklos Szeredi    2016-12-09   86  			goto out_put;
68177fb0 Miklos Szeredi    2016-12-09   87  		}
68177fb0 Miklos Szeredi    2016-12-09   88  		set_delayed_call(done, kfree_link, name);
68177fb0 Miklos Szeredi    2016-12-09   89  		res = name;
e149ed2b Al Viro           2014-11-01   90  	}
68177fb0 Miklos Szeredi    2016-12-09   91  out_put:
bf056bfa Eric W. Biederman 2011-06-18   92  	put_task_struct(task);
5d826c84 Al Viro           2014-03-14  @93  	return res;
bf056bfa Eric W. Biederman 2011-06-18   94  }
bf056bfa Eric W. Biederman 2011-06-18   95  
bf056bfa Eric W. Biederman 2011-06-18   96  static const struct inode_operations proc_ns_link_inode_operations = {
bf056bfa Eric W. Biederman 2011-06-18   97  	.readlink	= proc_ns_readlink,
6b255391 Al Viro           2015-11-17   98  	.get_link	= proc_ns_get_link,
bf056bfa Eric W. Biederman 2011-06-18   99  	.setattr	= proc_setattr,
bf056bfa Eric W. Biederman 2011-06-18  100  };
bf056bfa Eric W. Biederman 2011-06-18  101  

:::::: The code at line 93 was first introduced by commit
:::::: 5d826c847b34de6415b4f1becd88a57ff619af50 new helper: readlink_copy()

:::::: TO: Al Viro <viro@zeniv.linux.org.uk>
:::::: CC: Al Viro <viro@zeniv.linux.org.uk>

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 30790 bytes --]

                 reply	other threads:[~2016-12-09 19:46 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201612100310.AMlgHF4D%fengguang.wu@intel.com \
    --to=fengguang.wu@intel.com \
    --cc=kbuild-all@01.org \
    --cc=linux-unionfs@vger.kernel.org \
    --cc=mszeredi@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox