From: kernel test robot <lkp@intel.com>
To: NeilBrown <neil@brown.name>, Chuck Lever <chuck.lever@oracle.com>,
Jeff Layton <jlayton@kernel.org>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
linux-nfs@vger.kernel.org,
Olga Kornievskaia <okorniev@redhat.com>,
Dai Ngo <Dai.Ngo@oracle.com>, Tom Talpey <tom@talpey.com>,
Li Lingfeng <lilingfeng3@huawei.com>
Subject: Re: [PATCH 3/3] nfsd: split nfsd_mutex into one mutex per net-namespace.
Date: Thu, 19 Jun 2025 20:33:49 +0800 [thread overview]
Message-ID: <202506192052.L9tj28RJ-lkp@intel.com> (raw)
In-Reply-To: <20250618213347.425503-4-neil@brown.name>
Hi NeilBrown,
kernel test robot noticed the following build warnings:
[auto build test WARNING on brauner-vfs/vfs.all]
[also build test WARNING on trondmy-nfs/linux-next linus/master v6.16-rc2 next-20250619]
[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#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/NeilBrown/nfsd-provide-proper-locking-for-all-write_-function/20250619-053514
base: https://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs.git vfs.all
patch link: https://lore.kernel.org/r/20250618213347.425503-4-neil%40brown.name
patch subject: [PATCH 3/3] nfsd: split nfsd_mutex into one mutex per net-namespace.
config: x86_64-kexec (https://download.01.org/0day-ci/archive/20250619/202506192052.L9tj28RJ-lkp@intel.com/config)
compiler: clang version 20.1.2 (https://github.com/llvm/llvm-project 58df0ef89dd64126512e4ee27b4ac3fd8ddf6247)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250619/202506192052.L9tj28RJ-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202506192052.L9tj28RJ-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> fs/nfsd/nfsctl.c:1891:14: warning: variable 'nn' is uninitialized when used here [-Wuninitialized]
1891 | mutex_lock(&nn->nfsd_info.mutex);
| ^~
fs/nfsd/nfsctl.c:1877:21: note: initialize the variable 'nn' to silence this warning
1877 | struct nfsd_net *nn;
| ^
| = NULL
1 warning generated.
vim +/nn +1891 fs/nfsd/nfsctl.c
1867
1868 /**
1869 * nfsd_nl_version_get_doit - get the enabled status for all supported nfs versions
1870 * @skb: reply buffer
1871 * @info: netlink metadata and command arguments
1872 *
1873 * Return 0 on success or a negative errno.
1874 */
1875 int nfsd_nl_version_get_doit(struct sk_buff *skb, struct genl_info *info)
1876 {
1877 struct nfsd_net *nn;
1878 int i, err;
1879 void *hdr;
1880
1881 skb = genlmsg_new(GENLMSG_DEFAULT_SIZE, GFP_KERNEL);
1882 if (!skb)
1883 return -ENOMEM;
1884
1885 hdr = genlmsg_iput(skb, info);
1886 if (!hdr) {
1887 err = -EMSGSIZE;
1888 goto err_free_msg;
1889 }
1890
> 1891 mutex_lock(&nn->nfsd_info.mutex);
1892 nn = net_generic(genl_info_net(info), nfsd_net_id);
1893
1894 for (i = 2; i <= 4; i++) {
1895 int j;
1896
1897 for (j = 0; j <= NFSD_SUPPORTED_MINOR_VERSION; j++) {
1898 struct nlattr *attr;
1899
1900 /* Don't record any versions the kernel doesn't have
1901 * compiled in
1902 */
1903 if (!nfsd_support_version(i))
1904 continue;
1905
1906 /* NFSv{2,3} does not support minor numbers */
1907 if (i < 4 && j)
1908 continue;
1909
1910 attr = nla_nest_start(skb,
1911 NFSD_A_SERVER_PROTO_VERSION);
1912 if (!attr) {
1913 err = -EINVAL;
1914 goto err_nfsd_unlock;
1915 }
1916
1917 if (nla_put_u32(skb, NFSD_A_VERSION_MAJOR, i) ||
1918 nla_put_u32(skb, NFSD_A_VERSION_MINOR, j)) {
1919 err = -EINVAL;
1920 goto err_nfsd_unlock;
1921 }
1922
1923 /* Set the enabled flag if the version is enabled */
1924 if (nfsd_vers(nn, i, NFSD_TEST) &&
1925 (i < 4 || nfsd_minorversion(nn, j, NFSD_TEST)) &&
1926 nla_put_flag(skb, NFSD_A_VERSION_ENABLED)) {
1927 err = -EINVAL;
1928 goto err_nfsd_unlock;
1929 }
1930
1931 nla_nest_end(skb, attr);
1932 }
1933 }
1934
1935 mutex_unlock(&nn->nfsd_info.mutex);
1936 genlmsg_end(skb, hdr);
1937
1938 return genlmsg_reply(skb, info);
1939
1940 err_nfsd_unlock:
1941 mutex_unlock(&nn->nfsd_info.mutex);
1942 err_free_msg:
1943 nlmsg_free(skb);
1944
1945 return err;
1946 }
1947
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next prev parent reply other threads:[~2025-06-19 12:33 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-18 21:31 [PATCH 0/3 RFC] improve some nfsd_mutex locking NeilBrown
2025-06-18 21:31 ` [PATCH 1/3] nfsd: provide proper locking for all write_ function NeilBrown
2025-06-20 12:59 ` Jeff Layton
2025-06-18 21:31 ` [PATCH 2/3] nfsd: use kref and new mutex for global config management NeilBrown
2025-06-19 14:06 ` Chuck Lever
2025-06-20 13:01 ` Jeff Layton
2025-06-18 21:31 ` [PATCH 3/3] nfsd: split nfsd_mutex into one mutex per net-namespace NeilBrown
2025-06-19 12:33 ` kernel test robot [this message]
2025-06-20 13:13 ` Jeff Layton
-- strict thread matches above, loose matches on Subject: below --
2025-06-20 23:33 [PATCH 0/3 RFC] improve some nfsd_mutex locking NeilBrown
2025-06-20 23:33 ` [PATCH 3/3] nfsd: split nfsd_mutex into one mutex per net-namespace NeilBrown
2025-06-21 13:02 ` kernel test robot
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=202506192052.L9tj28RJ-lkp@intel.com \
--to=lkp@intel.com \
--cc=Dai.Ngo@oracle.com \
--cc=chuck.lever@oracle.com \
--cc=jlayton@kernel.org \
--cc=lilingfeng3@huawei.com \
--cc=linux-nfs@vger.kernel.org \
--cc=llvm@lists.linux.dev \
--cc=neil@brown.name \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=okorniev@redhat.com \
--cc=tom@talpey.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