From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on gnuweeb.org X-Spam-Level: X-Spam-Status: No, score=-6.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by gnuweeb.org (Postfix) with ESMTPS id 7DCAC80866 for ; Tue, 20 Sep 2022 05:01:13 +0000 (UTC) Authentication-Results: gnuweeb.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=LQkfKZtR; dkim-atps=neutral DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1663650073; x=1695186073; h=date:from:to:cc:subject:message-id:mime-version; bh=Dx0FlROKU4ofM7aX1m/nlPaygamllQ6oRkHYe/tU5zU=; b=LQkfKZtRJ2Mu63rRBVF7EbqVG308VyAl6A9pu9NSj1D7+3kJnB0QzM/W CglY0ihx+AgVohxWZ1Cc11oGmetL1fSgJeQHo+ETf4HgO0lwtWRV5LTDQ 34L4cH7f7EukBWOboFVmkUI05d12/6YV+1DpV0GaKbak96KGH/FZhVziJ 0kRe67bIa1lQLQHkxp96eWi0tD+WTcoOQWBLBW2pDzseN47DZQojgRZ8T lf2fMbBTw++Va9Zh2tjK0OtNYp0Uj1JmtBKGuOfLsw0P5UaHSEXzalBLx l5RBTWkcjeug8vddAHr6BFTa3ctQ8TtKIHSX6pDuWVv+0wq1YBjs/4OIl A==; X-IronPort-AV: E=McAfee;i="6500,9779,10475"; a="299586898" X-IronPort-AV: E=Sophos;i="5.93,329,1654585200"; d="scan'208";a="299586898" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Sep 2022 22:01:03 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.93,329,1654585200"; d="scan'208";a="596370308" Received: from lkp-server01.sh.intel.com (HELO c0a60f19fe7e) ([10.239.97.150]) by orsmga006.jf.intel.com with ESMTP; 19 Sep 2022 22:01:02 -0700 Received: from kbuild by c0a60f19fe7e with local (Exim 4.96) (envelope-from ) id 1oaVNV-0002UP-1O; Tue, 20 Sep 2022 05:01:01 +0000 Date: Tue, 20 Sep 2022 13:00:59 +0800 From: kernel test robot To: Ammar Faizi , GNU/Weeb Mailing List Cc: kbuild-all@lists.01.org Subject: [ammarfaizi2-block:google/android/kernel/common/android13-5.10 9677/9999] fs/fuse/backing.c:984:35: warning: variable 'fc' set but not used Message-ID: <202209201257.OdaaoTmB-lkp@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline List-Id: Hi Paul, FYI, the error/warning still remains. tree: https://github.com/ammarfaizi2/linux-block google/android/kernel/common/android13-5.10 head: aadf7ad9db2f7d93ecfb34d0e4f328519460c94e commit: 8efdff35e3052e44d519ccfb9d50594f5df0240b [9677/9999] ANDROID: fuse-bpf: Move fd operations to be synchronous config: x86_64-allyesconfig (https://download.01.org/0day-ci/archive/20220920/202209201257.OdaaoTmB-lkp@intel.com/config) compiler: gcc-11 (Debian 11.3.0-5) 11.3.0 reproduce (this is a W=1 build): # https://github.com/ammarfaizi2/linux-block/commit/8efdff35e3052e44d519ccfb9d50594f5df0240b git remote add ammarfaizi2-block https://github.com/ammarfaizi2/linux-block git fetch --no-tags ammarfaizi2-block google/android/kernel/common/android13-5.10 git checkout 8efdff35e3052e44d519ccfb9d50594f5df0240b # save the config file mkdir build_dir && cp config build_dir/.config make W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash fs/fuse/ If you fix the issue, kindly add following tag where applicable Reported-by: kernel test robot All warnings (new ones prefixed by >>): fs/fuse/backing.c: In function 'fuse_lookup_finalize': >> fs/fuse/backing.c:984:35: warning: variable 'fc' set but not used [-Wunused-but-set-variable] 984 | struct fuse_conn *fc; | ^~ fs/fuse/backing.c: In function 'fuse_statfs_initialize': fs/fuse/backing.c:1771:32: warning: initialized field overwritten [-Woverride-init] 1771 | .out_numargs = 1, | ^ fs/fuse/backing.c:1771:32: note: (near initialization for '(anonymous).out_numargs') vim +/fc +984 fs/fuse/backing.c 6be5b06e4195b00 Daniel Rosenberg 2021-12-02 911 6be5b06e4195b00 Daniel Rosenberg 2021-12-02 912 struct dentry *fuse_lookup_finalize(struct fuse_args *fa, struct inode *dir, 6be5b06e4195b00 Daniel Rosenberg 2021-12-02 913 struct dentry *entry, unsigned int flags) 6be5b06e4195b00 Daniel Rosenberg 2021-12-02 914 { 6be5b06e4195b00 Daniel Rosenberg 2021-12-02 915 struct fuse_dentry *fd; 6be5b06e4195b00 Daniel Rosenberg 2021-12-02 916 struct dentry *bd; 6be5b06e4195b00 Daniel Rosenberg 2021-12-02 917 struct inode *inode, *backing_inode; 6be5b06e4195b00 Daniel Rosenberg 2021-12-02 918 struct fuse_entry_out *feo = fa->out_args[0].value; 6be5b06e4195b00 Daniel Rosenberg 2021-12-02 919 struct fuse_entry_bpf_out *febo = fa->out_args[1].value; 6be5b06e4195b00 Daniel Rosenberg 2021-12-02 920 6be5b06e4195b00 Daniel Rosenberg 2021-12-02 921 fd = get_fuse_dentry(entry); 6be5b06e4195b00 Daniel Rosenberg 2021-12-02 922 if (!fd) 6be5b06e4195b00 Daniel Rosenberg 2021-12-02 923 return ERR_PTR(-EIO); 6be5b06e4195b00 Daniel Rosenberg 2021-12-02 924 bd = fd->backing_path.dentry; 6be5b06e4195b00 Daniel Rosenberg 2021-12-02 925 if (!bd) 6be5b06e4195b00 Daniel Rosenberg 2021-12-02 926 return ERR_PTR(-ENOENT); 6be5b06e4195b00 Daniel Rosenberg 2021-12-02 927 backing_inode = bd->d_inode; 6be5b06e4195b00 Daniel Rosenberg 2021-12-02 928 if (!backing_inode) 6be5b06e4195b00 Daniel Rosenberg 2021-12-02 929 return 0; 6be5b06e4195b00 Daniel Rosenberg 2021-12-02 930 6be5b06e4195b00 Daniel Rosenberg 2021-12-02 931 inode = fuse_iget_backing(dir->i_sb, backing_inode); 6be5b06e4195b00 Daniel Rosenberg 2021-12-02 932 6be5b06e4195b00 Daniel Rosenberg 2021-12-02 933 if (IS_ERR(inode)) 6be5b06e4195b00 Daniel Rosenberg 2021-12-02 934 return ERR_PTR(PTR_ERR(inode)); 6be5b06e4195b00 Daniel Rosenberg 2021-12-02 935 6be5b06e4195b00 Daniel Rosenberg 2021-12-02 936 /* TODO Make sure this handles invalid handles */ 6be5b06e4195b00 Daniel Rosenberg 2021-12-02 937 /* TODO Do we need the same code in revalidate */ 6be5b06e4195b00 Daniel Rosenberg 2021-12-02 938 if (get_fuse_inode(inode)->bpf) { 6be5b06e4195b00 Daniel Rosenberg 2021-12-02 939 bpf_prog_put(get_fuse_inode(inode)->bpf); 6be5b06e4195b00 Daniel Rosenberg 2021-12-02 940 get_fuse_inode(inode)->bpf = NULL; 6be5b06e4195b00 Daniel Rosenberg 2021-12-02 941 } 6be5b06e4195b00 Daniel Rosenberg 2021-12-02 942 6be5b06e4195b00 Daniel Rosenberg 2021-12-02 943 switch (febo->bpf_action) { 6be5b06e4195b00 Daniel Rosenberg 2021-12-02 944 case FUSE_ACTION_KEEP: 6be5b06e4195b00 Daniel Rosenberg 2021-12-02 945 get_fuse_inode(inode)->bpf = get_fuse_inode(dir)->bpf; 6be5b06e4195b00 Daniel Rosenberg 2021-12-02 946 if (get_fuse_inode(inode)->bpf) 6be5b06e4195b00 Daniel Rosenberg 2021-12-02 947 bpf_prog_inc(get_fuse_inode(inode)->bpf); 6be5b06e4195b00 Daniel Rosenberg 2021-12-02 948 break; 6be5b06e4195b00 Daniel Rosenberg 2021-12-02 949 6be5b06e4195b00 Daniel Rosenberg 2021-12-02 950 case FUSE_ACTION_REMOVE: 6be5b06e4195b00 Daniel Rosenberg 2021-12-02 951 get_fuse_inode(inode)->bpf = NULL; 6be5b06e4195b00 Daniel Rosenberg 2021-12-02 952 break; 6be5b06e4195b00 Daniel Rosenberg 2021-12-02 953 6be5b06e4195b00 Daniel Rosenberg 2021-12-02 954 case FUSE_ACTION_REPLACE: { 8efdff35e3052e4 Paul Lawrence 2022-03-04 955 struct file *bpf_file = (struct file*) febo->bpf_fd; 8efdff35e3052e4 Paul Lawrence 2022-03-04 956 struct bpf_prog *bpf_prog = ERR_PTR(-EINVAL); 8efdff35e3052e4 Paul Lawrence 2022-03-04 957 8efdff35e3052e4 Paul Lawrence 2022-03-04 958 if (bpf_file && !IS_ERR(bpf_file)) 8efdff35e3052e4 Paul Lawrence 2022-03-04 959 bpf_prog = fuse_get_bpf_prog(bpf_file); 6be5b06e4195b00 Daniel Rosenberg 2021-12-02 960 6be5b06e4195b00 Daniel Rosenberg 2021-12-02 961 if (IS_ERR(bpf_prog)) 6be5b06e4195b00 Daniel Rosenberg 2021-12-02 962 return ERR_PTR(PTR_ERR(bpf_prog)); 6be5b06e4195b00 Daniel Rosenberg 2021-12-02 963 6be5b06e4195b00 Daniel Rosenberg 2021-12-02 964 get_fuse_inode(inode)->bpf = bpf_prog; 6be5b06e4195b00 Daniel Rosenberg 2021-12-02 965 break; 6be5b06e4195b00 Daniel Rosenberg 2021-12-02 966 } 6be5b06e4195b00 Daniel Rosenberg 2021-12-02 967 6be5b06e4195b00 Daniel Rosenberg 2021-12-02 968 default: 6be5b06e4195b00 Daniel Rosenberg 2021-12-02 969 return ERR_PTR(-EIO); 6be5b06e4195b00 Daniel Rosenberg 2021-12-02 970 } 6be5b06e4195b00 Daniel Rosenberg 2021-12-02 971 6be5b06e4195b00 Daniel Rosenberg 2021-12-02 972 switch (febo->backing_action) { 6be5b06e4195b00 Daniel Rosenberg 2021-12-02 973 case FUSE_ACTION_KEEP: 6be5b06e4195b00 Daniel Rosenberg 2021-12-02 974 /* backing inode/path are added in fuse_lookup_backing */ 6be5b06e4195b00 Daniel Rosenberg 2021-12-02 975 break; 6be5b06e4195b00 Daniel Rosenberg 2021-12-02 976 6be5b06e4195b00 Daniel Rosenberg 2021-12-02 977 case FUSE_ACTION_REMOVE: 6be5b06e4195b00 Daniel Rosenberg 2021-12-02 978 iput(get_fuse_inode(inode)->backing_inode); 6be5b06e4195b00 Daniel Rosenberg 2021-12-02 979 get_fuse_inode(inode)->backing_inode = NULL; 6be5b06e4195b00 Daniel Rosenberg 2021-12-02 980 path_put_init(&get_fuse_dentry(entry)->backing_path); 6be5b06e4195b00 Daniel Rosenberg 2021-12-02 981 break; 6be5b06e4195b00 Daniel Rosenberg 2021-12-02 982 6be5b06e4195b00 Daniel Rosenberg 2021-12-02 983 case FUSE_ACTION_REPLACE: { 6be5b06e4195b00 Daniel Rosenberg 2021-12-02 @984 struct fuse_conn *fc; 6be5b06e4195b00 Daniel Rosenberg 2021-12-02 985 struct file *backing_file; 6be5b06e4195b00 Daniel Rosenberg 2021-12-02 986 6be5b06e4195b00 Daniel Rosenberg 2021-12-02 987 fc = get_fuse_mount(dir)->fc; 8efdff35e3052e4 Paul Lawrence 2022-03-04 988 backing_file = (struct file *) febo->backing_fd; 8efdff35e3052e4 Paul Lawrence 2022-03-04 989 if (!backing_file || IS_ERR(backing_file)) 6be5b06e4195b00 Daniel Rosenberg 2021-12-02 990 return ERR_PTR(-EIO); 6be5b06e4195b00 Daniel Rosenberg 2021-12-02 991 6be5b06e4195b00 Daniel Rosenberg 2021-12-02 992 iput(get_fuse_inode(inode)->backing_inode); 6be5b06e4195b00 Daniel Rosenberg 2021-12-02 993 get_fuse_inode(inode)->backing_inode = 6be5b06e4195b00 Daniel Rosenberg 2021-12-02 994 backing_file->f_inode; 6be5b06e4195b00 Daniel Rosenberg 2021-12-02 995 ihold(get_fuse_inode(inode)->backing_inode); 6be5b06e4195b00 Daniel Rosenberg 2021-12-02 996 6be5b06e4195b00 Daniel Rosenberg 2021-12-02 997 path_put(&get_fuse_dentry(entry)->backing_path); 6be5b06e4195b00 Daniel Rosenberg 2021-12-02 998 get_fuse_dentry(entry)->backing_path = backing_file->f_path; 6be5b06e4195b00 Daniel Rosenberg 2021-12-02 999 path_get(&get_fuse_dentry(entry)->backing_path); 6be5b06e4195b00 Daniel Rosenberg 2021-12-02 1000 6be5b06e4195b00 Daniel Rosenberg 2021-12-02 1001 fput(backing_file); 6be5b06e4195b00 Daniel Rosenberg 2021-12-02 1002 break; 6be5b06e4195b00 Daniel Rosenberg 2021-12-02 1003 } 6be5b06e4195b00 Daniel Rosenberg 2021-12-02 1004 6be5b06e4195b00 Daniel Rosenberg 2021-12-02 1005 default: 6be5b06e4195b00 Daniel Rosenberg 2021-12-02 1006 return ERR_PTR(-EIO); 6be5b06e4195b00 Daniel Rosenberg 2021-12-02 1007 } 6be5b06e4195b00 Daniel Rosenberg 2021-12-02 1008 6be5b06e4195b00 Daniel Rosenberg 2021-12-02 1009 get_fuse_inode(inode)->nodeid = feo->nodeid; 6be5b06e4195b00 Daniel Rosenberg 2021-12-02 1010 6be5b06e4195b00 Daniel Rosenberg 2021-12-02 1011 return d_splice_alias(inode, entry); 6be5b06e4195b00 Daniel Rosenberg 2021-12-02 1012 } 6be5b06e4195b00 Daniel Rosenberg 2021-12-02 1013 :::::: The code at line 984 was first introduced by commit :::::: 6be5b06e4195b002c52a1c2c82573ea7a76ce111 ANDROID: fuse-bpf v1 :::::: TO: Daniel Rosenberg :::::: CC: Paul Lawrence -- 0-DAY CI Kernel Test Service https://01.org/lkp