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@xxxxxxxxx/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@xxxxxxxxx/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@xxxxxxxxx> | Closes: https://lore.kernel.org/oe-kbuild-all/202506192052.L9tj28RJ-lkp@xxxxxxxxx/ 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