All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: kbuild@lists.01.org
Subject: Re: [PATCH v2 05/14] NFS: Remove the label from the nfs4_lookup_res struct
Date: Fri, 12 Nov 2021 14:45:44 +0800	[thread overview]
Message-ID: <202111121424.MY0UF0lc-lkp@intel.com> (raw)

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

CC: kbuild-all(a)lists.01.org
In-Reply-To: <20211022171113.16739-6-Anna.Schumaker@Netapp.com>
References: <20211022171113.16739-6-Anna.Schumaker@Netapp.com>
TO: schumaker.anna(a)gmail.com

Hi,

I love your patch! Perhaps something to improve:

[auto build test WARNING on trondmy-nfs/linux-next]
[also build test WARNING on v5.15]
[cannot apply to next-20211112]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/schumaker-anna-gmail-com/NFS-Clean-up-nfs4_label-allocation/20211024-104605
base:   git://git.linux-nfs.org/projects/trondmy/linux-nfs.git linux-next
:::::: branch date: 3 weeks ago
:::::: commit date: 3 weeks ago
config: i386-randconfig-m021-20211025 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>

New smatch warnings:
fs/nfs/dir.c:1802 nfs_lookup() error: uninitialized symbol 'error'.

Old smatch warnings:
fs/nfs/dir.c:287 nfs_readdir_add_to_array() warn: potential spectre issue 'array->array' [r]

vim +/error +1802 fs/nfs/dir.c

^1da177e4c3f41 Linus Torvalds  2005-04-16  1747  
597d92891b8859 Bryan Schumaker 2012-07-16  1748  struct dentry *nfs_lookup(struct inode *dir, struct dentry * dentry, unsigned int flags)
^1da177e4c3f41 Linus Torvalds  2005-04-16  1749  {
^1da177e4c3f41 Linus Torvalds  2005-04-16  1750  	struct dentry *res;
^1da177e4c3f41 Linus Torvalds  2005-04-16  1751  	struct inode *inode = NULL;
e1fb4d05d5a326 Trond Myklebust 2010-04-16  1752  	struct nfs_fh *fhandle = NULL;
e1fb4d05d5a326 Trond Myklebust 2010-04-16  1753  	struct nfs_fattr *fattr = NULL;
a1147b8281bda9 Trond Myklebust 2020-02-05  1754  	unsigned long dir_verifier;
^1da177e4c3f41 Linus Torvalds  2005-04-16  1755  	int error;
^1da177e4c3f41 Linus Torvalds  2005-04-16  1756  
6de1472f1a4a3b Al Viro         2013-09-16  1757  	dfprintk(VFS, "NFS: lookup(%pd2)\n", dentry);
91d5b47023b608 Chuck Lever     2006-03-20  1758  	nfs_inc_stats(dir, NFSIOS_VFSLOOKUP);
^1da177e4c3f41 Linus Torvalds  2005-04-16  1759  
130f9ab75dc3af Al Viro         2016-03-07  1760  	if (unlikely(dentry->d_name.len > NFS_SERVER(dir)->namelen))
130f9ab75dc3af Al Viro         2016-03-07  1761  		return ERR_PTR(-ENAMETOOLONG);
^1da177e4c3f41 Linus Torvalds  2005-04-16  1762  
fd6840714d9cf6 Trond Myklebust 2006-09-05  1763  	/*
fd6840714d9cf6 Trond Myklebust 2006-09-05  1764  	 * If we're doing an exclusive create, optimize away the lookup
fd6840714d9cf6 Trond Myklebust 2006-09-05  1765  	 * but don't hash the dentry.
fd6840714d9cf6 Trond Myklebust 2006-09-05  1766  	 */
9f6d44d418b1f4 Trond Myklebust 2018-05-10  1767  	if (nfs_is_exclusive_create(dir, flags) || flags & LOOKUP_RENAME_TARGET)
130f9ab75dc3af Al Viro         2016-03-07  1768  		return NULL;
^1da177e4c3f41 Linus Torvalds  2005-04-16  1769  
e1fb4d05d5a326 Trond Myklebust 2010-04-16  1770  	res = ERR_PTR(-ENOMEM);
e1fb4d05d5a326 Trond Myklebust 2010-04-16  1771  	fhandle = nfs_alloc_fhandle();
ca3c213e9f9273 Anna Schumaker  2021-10-22  1772  	fattr = nfs_alloc_fattr_with_label(NFS_SERVER(dir));
e1fb4d05d5a326 Trond Myklebust 2010-04-16  1773  	if (fhandle == NULL || fattr == NULL)
e1fb4d05d5a326 Trond Myklebust 2010-04-16  1774  		goto out;
e1fb4d05d5a326 Trond Myklebust 2010-04-16  1775  
a1147b8281bda9 Trond Myklebust 2020-02-05  1776  	dir_verifier = nfs_save_change_attribute(dir);
6e0d0be715fe04 Trond Myklebust 2013-08-20  1777  	trace_nfs_lookup_enter(dir, dentry, flags);
ca3c213e9f9273 Anna Schumaker  2021-10-22  1778  	error = NFS_PROTO(dir)->lookup(dir, dentry, fhandle, fattr);
^1da177e4c3f41 Linus Torvalds  2005-04-16  1779  	if (error == -ENOENT)
^1da177e4c3f41 Linus Torvalds  2005-04-16  1780  		goto no_entry;
^1da177e4c3f41 Linus Torvalds  2005-04-16  1781  	if (error < 0) {
^1da177e4c3f41 Linus Torvalds  2005-04-16  1782  		res = ERR_PTR(error);
ca3c213e9f9273 Anna Schumaker  2021-10-22  1783  		goto out;
^1da177e4c3f41 Linus Torvalds  2005-04-16  1784  	}
ca3c213e9f9273 Anna Schumaker  2021-10-22  1785  	inode = nfs_fhget(dentry->d_sb, fhandle, fattr, fattr->label);
bf0c84f1614bff Namhyung Kim    2010-12-28  1786  	res = ERR_CAST(inode);
03f28e3a2059fc Trond Myklebust 2006-03-20  1787  	if (IS_ERR(res))
ca3c213e9f9273 Anna Schumaker  2021-10-22  1788  		goto out;
54ceac45159860 David Howells   2006-08-22  1789  
63519fbc67d0d9 Trond Myklebust 2016-11-19  1790  	/* Notify readdir to use READDIRPLUS */
63519fbc67d0d9 Trond Myklebust 2016-11-19  1791  	nfs_force_use_readdirplus(dir);
d69ee9b85541a6 Trond Myklebust 2012-05-01  1792  
^1da177e4c3f41 Linus Torvalds  2005-04-16  1793  no_entry:
41d28bca2da4bd Al Viro         2014-10-12  1794  	res = d_splice_alias(inode, dentry);
9eaef27b36a6b7 Trond Myklebust 2006-10-21  1795  	if (res != NULL) {
9eaef27b36a6b7 Trond Myklebust 2006-10-21  1796  		if (IS_ERR(res))
ca3c213e9f9273 Anna Schumaker  2021-10-22  1797  			goto out;
^1da177e4c3f41 Linus Torvalds  2005-04-16  1798  		dentry = res;
9eaef27b36a6b7 Trond Myklebust 2006-10-21  1799  	}
a1147b8281bda9 Trond Myklebust 2020-02-05  1800  	nfs_set_verifier(dentry, dir_verifier);
^1da177e4c3f41 Linus Torvalds  2005-04-16  1801  out:
ca3c213e9f9273 Anna Schumaker  2021-10-22 @1802  	trace_nfs_lookup_exit(dir, dentry, flags, error);
e1fb4d05d5a326 Trond Myklebust 2010-04-16  1803  	nfs_free_fattr(fattr);
e1fb4d05d5a326 Trond Myklebust 2010-04-16  1804  	nfs_free_fhandle(fhandle);
^1da177e4c3f41 Linus Torvalds  2005-04-16  1805  	return res;
^1da177e4c3f41 Linus Torvalds  2005-04-16  1806  }
ddda8e0aa8b955 Bryan Schumaker 2012-07-30  1807  EXPORT_SYMBOL_GPL(nfs_lookup);
^1da177e4c3f41 Linus Torvalds  2005-04-16  1808  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

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

WARNING: multiple messages have this Message-ID (diff)
From: Dan Carpenter <dan.carpenter@oracle.com>
To: kbuild-all@lists.01.org
Subject: Re: [PATCH v2 05/14] NFS: Remove the label from the nfs4_lookup_res struct
Date: Tue, 16 Nov 2021 10:10:08 +0300	[thread overview]
Message-ID: <202111121424.MY0UF0lc-lkp@intel.com> (raw)
In-Reply-To: <20211022171113.16739-6-Anna.Schumaker@Netapp.com>

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

Hi,

url:    https://github.com/0day-ci/linux/commits/schumaker-anna-gmail-com/NFS-Clean-up-nfs4_label-allocation/20211024-104605
base:   git://git.linux-nfs.org/projects/trondmy/linux-nfs.git linux-next
config: i386-randconfig-m021-20211025 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>

New smatch warnings:
fs/nfs/dir.c:1802 nfs_lookup() error: uninitialized symbol 'error'.

vim +/error +1802 fs/nfs/dir.c

597d92891b8859 Bryan Schumaker 2012-07-16  1748  struct dentry *nfs_lookup(struct inode *dir, struct dentry * dentry, unsigned int flags)
^1da177e4c3f41 Linus Torvalds  2005-04-16  1749  {
^1da177e4c3f41 Linus Torvalds  2005-04-16  1750  	struct dentry *res;
^1da177e4c3f41 Linus Torvalds  2005-04-16  1751  	struct inode *inode = NULL;
e1fb4d05d5a326 Trond Myklebust 2010-04-16  1752  	struct nfs_fh *fhandle = NULL;
e1fb4d05d5a326 Trond Myklebust 2010-04-16  1753  	struct nfs_fattr *fattr = NULL;
a1147b8281bda9 Trond Myklebust 2020-02-05  1754  	unsigned long dir_verifier;
^1da177e4c3f41 Linus Torvalds  2005-04-16  1755  	int error;
^1da177e4c3f41 Linus Torvalds  2005-04-16  1756  
6de1472f1a4a3b Al Viro         2013-09-16  1757  	dfprintk(VFS, "NFS: lookup(%pd2)\n", dentry);
91d5b47023b608 Chuck Lever     2006-03-20  1758  	nfs_inc_stats(dir, NFSIOS_VFSLOOKUP);
^1da177e4c3f41 Linus Torvalds  2005-04-16  1759  
130f9ab75dc3af Al Viro         2016-03-07  1760  	if (unlikely(dentry->d_name.len > NFS_SERVER(dir)->namelen))
130f9ab75dc3af Al Viro         2016-03-07  1761  		return ERR_PTR(-ENAMETOOLONG);
^1da177e4c3f41 Linus Torvalds  2005-04-16  1762  
fd6840714d9cf6 Trond Myklebust 2006-09-05  1763  	/*
fd6840714d9cf6 Trond Myklebust 2006-09-05  1764  	 * If we're doing an exclusive create, optimize away the lookup
fd6840714d9cf6 Trond Myklebust 2006-09-05  1765  	 * but don't hash the dentry.
fd6840714d9cf6 Trond Myklebust 2006-09-05  1766  	 */
9f6d44d418b1f4 Trond Myklebust 2018-05-10  1767  	if (nfs_is_exclusive_create(dir, flags) || flags & LOOKUP_RENAME_TARGET)
130f9ab75dc3af Al Viro         2016-03-07  1768  		return NULL;
^1da177e4c3f41 Linus Torvalds  2005-04-16  1769  
e1fb4d05d5a326 Trond Myklebust 2010-04-16  1770  	res = ERR_PTR(-ENOMEM);
e1fb4d05d5a326 Trond Myklebust 2010-04-16  1771  	fhandle = nfs_alloc_fhandle();
ca3c213e9f9273 Anna Schumaker  2021-10-22  1772  	fattr = nfs_alloc_fattr_with_label(NFS_SERVER(dir));
e1fb4d05d5a326 Trond Myklebust 2010-04-16  1773  	if (fhandle == NULL || fattr == NULL)
e1fb4d05d5a326 Trond Myklebust 2010-04-16  1774  		goto out;

"error" uninitialized.

e1fb4d05d5a326 Trond Myklebust 2010-04-16  1775  
a1147b8281bda9 Trond Myklebust 2020-02-05  1776  	dir_verifier = nfs_save_change_attribute(dir);
6e0d0be715fe04 Trond Myklebust 2013-08-20  1777  	trace_nfs_lookup_enter(dir, dentry, flags);
ca3c213e9f9273 Anna Schumaker  2021-10-22  1778  	error = NFS_PROTO(dir)->lookup(dir, dentry, fhandle, fattr);
^1da177e4c3f41 Linus Torvalds  2005-04-16  1779  	if (error == -ENOENT)
^1da177e4c3f41 Linus Torvalds  2005-04-16  1780  		goto no_entry;
^1da177e4c3f41 Linus Torvalds  2005-04-16  1781  	if (error < 0) {
^1da177e4c3f41 Linus Torvalds  2005-04-16  1782  		res = ERR_PTR(error);
ca3c213e9f9273 Anna Schumaker  2021-10-22  1783  		goto out;
^1da177e4c3f41 Linus Torvalds  2005-04-16  1784  	}
ca3c213e9f9273 Anna Schumaker  2021-10-22  1785  	inode = nfs_fhget(dentry->d_sb, fhandle, fattr, fattr->label);
bf0c84f1614bff Namhyung Kim    2010-12-28  1786  	res = ERR_CAST(inode);
03f28e3a2059fc Trond Myklebust 2006-03-20  1787  	if (IS_ERR(res))
ca3c213e9f9273 Anna Schumaker  2021-10-22  1788  		goto out;
54ceac45159860 David Howells   2006-08-22  1789  
63519fbc67d0d9 Trond Myklebust 2016-11-19  1790  	/* Notify readdir to use READDIRPLUS */
63519fbc67d0d9 Trond Myklebust 2016-11-19  1791  	nfs_force_use_readdirplus(dir);
d69ee9b85541a6 Trond Myklebust 2012-05-01  1792  
^1da177e4c3f41 Linus Torvalds  2005-04-16  1793  no_entry:
41d28bca2da4bd Al Viro         2014-10-12  1794  	res = d_splice_alias(inode, dentry);
9eaef27b36a6b7 Trond Myklebust 2006-10-21  1795  	if (res != NULL) {
9eaef27b36a6b7 Trond Myklebust 2006-10-21  1796  		if (IS_ERR(res))
ca3c213e9f9273 Anna Schumaker  2021-10-22  1797  			goto out;
^1da177e4c3f41 Linus Torvalds  2005-04-16  1798  		dentry = res;
9eaef27b36a6b7 Trond Myklebust 2006-10-21  1799  	}
a1147b8281bda9 Trond Myklebust 2020-02-05  1800  	nfs_set_verifier(dentry, dir_verifier);
^1da177e4c3f41 Linus Torvalds  2005-04-16  1801  out:
ca3c213e9f9273 Anna Schumaker  2021-10-22 @1802  	trace_nfs_lookup_exit(dir, dentry, flags, error);
                                                                                                  ^^^^^

e1fb4d05d5a326 Trond Myklebust 2010-04-16  1803  	nfs_free_fattr(fattr);
e1fb4d05d5a326 Trond Myklebust 2010-04-16  1804  	nfs_free_fhandle(fhandle);
^1da177e4c3f41 Linus Torvalds  2005-04-16  1805  	return res;
^1da177e4c3f41 Linus Torvalds  2005-04-16  1806  }

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

             reply	other threads:[~2021-11-12  6:45 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-12  6:45 kernel test robot [this message]
2021-11-16  7:10 ` [PATCH v2 05/14] NFS: Remove the label from the nfs4_lookup_res struct Dan Carpenter
  -- strict thread matches above, loose matches on Subject: below --
2021-10-22 17:10 [PATCH v2 00/14] NFS: Clean up nfs4_label allocation schumaker.anna
2021-10-22 17:11 ` [PATCH v2 01/14] NFS: Create a new nfs_alloc_fattr_with_label() function schumaker.anna
2021-10-22 17:11 ` [PATCH v2 02/14] NFS: Remove the nfs4_label from the nfs_entry struct schumaker.anna
2021-10-22 17:11 ` [PATCH v2 03/14] NFS: Remove the nfs4_label from the nfs4_create_res struct schumaker.anna
2021-10-22 17:11 ` [PATCH v2 04/14] NFS: Remove the nfs4_label from the nfs4_link_res struct schumaker.anna
2021-10-22 17:11 ` [PATCH v2 05/14] NFS: Remove the label from the nfs4_lookup_res struct schumaker.anna
2021-11-07  1:24   ` kernel test robot
2021-11-07  1:24     ` kernel test robot
2021-10-22 17:11 ` [PATCH v2 06/14] NFS: Remove the nfs4_label from the nfs4_lookupp_res struct schumaker.anna
2021-10-22 17:11 ` [PATCH v2 07/14] NFS: Remove the f_label from the nfs4_opendata and nfs_openres schumaker.anna
2021-10-22 17:11 ` [PATCH v2 08/14] NFS: Remove the nfs4_label from the nfs4_getattr_res schumaker.anna
2021-10-22 17:11 ` [PATCH v2 09/14] NFS: Remove the nfs4_label from the nfs_setattrres schumaker.anna
2021-10-22 17:11 ` [PATCH v2 10/14] NFS: Remove the nfs4_label argument from nfs_instantiate() schumaker.anna
2021-10-22 17:11 ` [PATCH v2 11/14] NFS: Remove the nfs4_label argument from nfs_add_or_obtain() schumaker.anna
2021-10-22 17:11 ` [PATCH v2 12/14] NFS: Remove the nfs4_label argument from nfs_fhget() schumaker.anna
2021-10-22 17:11 ` [PATCH v2 13/14] NFS: Remove the nfs4_label argument from nfs_setsecurity schumaker.anna
2021-10-22 17:11 ` [PATCH v2 14/14] NFS: Remove the nfs4_label argument from decode_getattr_*() functions schumaker.anna

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=202111121424.MY0UF0lc-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kbuild@lists.01.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.