tree: git://git.samba.org/sfrench/cifs-2.6.git for-next head: 1bfcaa4b7f0b84d397f0080aec64c4c948fc84c0 commit: 1bfcaa4b7f0b84d397f0080aec64c4c948fc84c0 [32/32] smb3: remove unused variable config: mips-randconfig-r034-20201022 (attached as .config) compiler: mips-linux-gcc (GCC) 9.3.0 reproduce (this is a W=1 build): wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross git remote add cifs git://git.samba.org/sfrench/cifs-2.6.git git fetch --no-tags cifs for-next git checkout 1bfcaa4b7f0b84d397f0080aec64c4c948fc84c0 # save the attached .config to linux build tree COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=mips If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot <lkp@xxxxxxxxx> All warnings (new ones prefixed by >>): fs/cifs/smb2ops.c: In function 'smb2_query_reparse_tag': >> fs/cifs/smb2ops.c:3055:26: warning: variable 'create_rsp' set but not used [-Wunused-but-set-variable] 3055 | struct smb2_create_rsp *create_rsp; | ^~~~~~~~~~ vim +/create_rsp +3055 fs/cifs/smb2ops.c b42bf88828cde6 Pavel Shilovsky 2013-08-14 3036 3d15f3db17ec6b Steve French 2020-10-22 3037 int 3d15f3db17ec6b Steve French 2020-10-22 3038 smb2_query_reparse_tag(const unsigned int xid, struct cifs_tcon *tcon, 3d15f3db17ec6b Steve French 2020-10-22 3039 struct cifs_sb_info *cifs_sb, const char *full_path, 3d15f3db17ec6b Steve French 2020-10-22 3040 __u32 *tag) 3d15f3db17ec6b Steve French 2020-10-22 3041 { 3d15f3db17ec6b Steve French 2020-10-22 3042 int rc; 3d15f3db17ec6b Steve French 2020-10-22 3043 __le16 *utf16_path = NULL; 3d15f3db17ec6b Steve French 2020-10-22 3044 __u8 oplock = SMB2_OPLOCK_LEVEL_NONE; 3d15f3db17ec6b Steve French 2020-10-22 3045 struct cifs_open_parms oparms; 3d15f3db17ec6b Steve French 2020-10-22 3046 struct cifs_fid fid; 3d15f3db17ec6b Steve French 2020-10-22 3047 struct TCP_Server_Info *server = cifs_pick_channel(tcon->ses); 3d15f3db17ec6b Steve French 2020-10-22 3048 int flags = 0; 3d15f3db17ec6b Steve French 2020-10-22 3049 struct smb_rqst rqst[3]; 3d15f3db17ec6b Steve French 2020-10-22 3050 int resp_buftype[3]; 3d15f3db17ec6b Steve French 2020-10-22 3051 struct kvec rsp_iov[3]; 3d15f3db17ec6b Steve French 2020-10-22 3052 struct kvec open_iov[SMB2_CREATE_IOV_SIZE]; 3d15f3db17ec6b Steve French 2020-10-22 3053 struct kvec io_iov[SMB2_IOCTL_IOV_SIZE]; 3d15f3db17ec6b Steve French 2020-10-22 3054 struct kvec close_iov[1]; 3d15f3db17ec6b Steve French 2020-10-22 @3055 struct smb2_create_rsp *create_rsp; 3d15f3db17ec6b Steve French 2020-10-22 3056 struct smb2_ioctl_rsp *ioctl_rsp; 3d15f3db17ec6b Steve French 2020-10-22 3057 struct reparse_data_buffer *reparse_buf; 3d15f3db17ec6b Steve French 2020-10-22 3058 u32 plen; 3d15f3db17ec6b Steve French 2020-10-22 3059 3d15f3db17ec6b Steve French 2020-10-22 3060 cifs_dbg(FYI, "%s: path: %s\n", __func__, full_path); 3d15f3db17ec6b Steve French 2020-10-22 3061 3d15f3db17ec6b Steve French 2020-10-22 3062 if (smb3_encryption_required(tcon)) 3d15f3db17ec6b Steve French 2020-10-22 3063 flags |= CIFS_TRANSFORM_REQ; 3d15f3db17ec6b Steve French 2020-10-22 3064 3d15f3db17ec6b Steve French 2020-10-22 3065 memset(rqst, 0, sizeof(rqst)); 3d15f3db17ec6b Steve French 2020-10-22 3066 resp_buftype[0] = resp_buftype[1] = resp_buftype[2] = CIFS_NO_BUFFER; 3d15f3db17ec6b Steve French 2020-10-22 3067 memset(rsp_iov, 0, sizeof(rsp_iov)); 3d15f3db17ec6b Steve French 2020-10-22 3068 3d15f3db17ec6b Steve French 2020-10-22 3069 utf16_path = cifs_convert_path_to_utf16(full_path, cifs_sb); 3d15f3db17ec6b Steve French 2020-10-22 3070 if (!utf16_path) 3d15f3db17ec6b Steve French 2020-10-22 3071 return -ENOMEM; 3d15f3db17ec6b Steve French 2020-10-22 3072 3d15f3db17ec6b Steve French 2020-10-22 3073 /* 3d15f3db17ec6b Steve French 2020-10-22 3074 * setup smb2open - TODO add optimization to call cifs_get_readable_path 3d15f3db17ec6b Steve French 2020-10-22 3075 * to see if there is a handle already open that we can use 3d15f3db17ec6b Steve French 2020-10-22 3076 */ 3d15f3db17ec6b Steve French 2020-10-22 3077 memset(&open_iov, 0, sizeof(open_iov)); 3d15f3db17ec6b Steve French 2020-10-22 3078 rqst[0].rq_iov = open_iov; 3d15f3db17ec6b Steve French 2020-10-22 3079 rqst[0].rq_nvec = SMB2_CREATE_IOV_SIZE; 3d15f3db17ec6b Steve French 2020-10-22 3080 3d15f3db17ec6b Steve French 2020-10-22 3081 memset(&oparms, 0, sizeof(oparms)); 3d15f3db17ec6b Steve French 2020-10-22 3082 oparms.tcon = tcon; 3d15f3db17ec6b Steve French 2020-10-22 3083 oparms.desired_access = FILE_READ_ATTRIBUTES; 3d15f3db17ec6b Steve French 2020-10-22 3084 oparms.disposition = FILE_OPEN; 3d15f3db17ec6b Steve French 2020-10-22 3085 oparms.create_options = cifs_create_options(cifs_sb, OPEN_REPARSE_POINT); 3d15f3db17ec6b Steve French 2020-10-22 3086 oparms.fid = &fid; 3d15f3db17ec6b Steve French 2020-10-22 3087 oparms.reconnect = false; 3d15f3db17ec6b Steve French 2020-10-22 3088 3d15f3db17ec6b Steve French 2020-10-22 3089 rc = SMB2_open_init(tcon, server, 3d15f3db17ec6b Steve French 2020-10-22 3090 &rqst[0], &oplock, &oparms, utf16_path); 3d15f3db17ec6b Steve French 2020-10-22 3091 if (rc) 3d15f3db17ec6b Steve French 2020-10-22 3092 goto query_rp_exit; 3d15f3db17ec6b Steve French 2020-10-22 3093 smb2_set_next_command(tcon, &rqst[0]); 3d15f3db17ec6b Steve French 2020-10-22 3094 3d15f3db17ec6b Steve French 2020-10-22 3095 3d15f3db17ec6b Steve French 2020-10-22 3096 /* IOCTL */ 3d15f3db17ec6b Steve French 2020-10-22 3097 memset(&io_iov, 0, sizeof(io_iov)); 3d15f3db17ec6b Steve French 2020-10-22 3098 rqst[1].rq_iov = io_iov; 3d15f3db17ec6b Steve French 2020-10-22 3099 rqst[1].rq_nvec = SMB2_IOCTL_IOV_SIZE; 3d15f3db17ec6b Steve French 2020-10-22 3100 3d15f3db17ec6b Steve French 2020-10-22 3101 rc = SMB2_ioctl_init(tcon, server, 3d15f3db17ec6b Steve French 2020-10-22 3102 &rqst[1], fid.persistent_fid, 3d15f3db17ec6b Steve French 2020-10-22 3103 fid.volatile_fid, FSCTL_GET_REPARSE_POINT, 3d15f3db17ec6b Steve French 2020-10-22 3104 true /* is_fctl */, NULL, 0, 3d15f3db17ec6b Steve French 2020-10-22 3105 CIFSMaxBufSize - 3d15f3db17ec6b Steve French 2020-10-22 3106 MAX_SMB2_CREATE_RESPONSE_SIZE - 3d15f3db17ec6b Steve French 2020-10-22 3107 MAX_SMB2_CLOSE_RESPONSE_SIZE); 3d15f3db17ec6b Steve French 2020-10-22 3108 if (rc) 3d15f3db17ec6b Steve French 2020-10-22 3109 goto query_rp_exit; 3d15f3db17ec6b Steve French 2020-10-22 3110 3d15f3db17ec6b Steve French 2020-10-22 3111 smb2_set_next_command(tcon, &rqst[1]); 3d15f3db17ec6b Steve French 2020-10-22 3112 smb2_set_related(&rqst[1]); 3d15f3db17ec6b Steve French 2020-10-22 3113 3d15f3db17ec6b Steve French 2020-10-22 3114 3d15f3db17ec6b Steve French 2020-10-22 3115 /* Close */ 3d15f3db17ec6b Steve French 2020-10-22 3116 memset(&close_iov, 0, sizeof(close_iov)); 3d15f3db17ec6b Steve French 2020-10-22 3117 rqst[2].rq_iov = close_iov; 3d15f3db17ec6b Steve French 2020-10-22 3118 rqst[2].rq_nvec = 1; 3d15f3db17ec6b Steve French 2020-10-22 3119 3d15f3db17ec6b Steve French 2020-10-22 3120 rc = SMB2_close_init(tcon, server, 3d15f3db17ec6b Steve French 2020-10-22 3121 &rqst[2], COMPOUND_FID, COMPOUND_FID, false); 3d15f3db17ec6b Steve French 2020-10-22 3122 if (rc) 3d15f3db17ec6b Steve French 2020-10-22 3123 goto query_rp_exit; 3d15f3db17ec6b Steve French 2020-10-22 3124 3d15f3db17ec6b Steve French 2020-10-22 3125 smb2_set_related(&rqst[2]); 3d15f3db17ec6b Steve French 2020-10-22 3126 3d15f3db17ec6b Steve French 2020-10-22 3127 rc = compound_send_recv(xid, tcon->ses, server, 3d15f3db17ec6b Steve French 2020-10-22 3128 flags, 3, rqst, 3d15f3db17ec6b Steve French 2020-10-22 3129 resp_buftype, rsp_iov); 3d15f3db17ec6b Steve French 2020-10-22 3130 3d15f3db17ec6b Steve French 2020-10-22 3131 create_rsp = rsp_iov[0].iov_base; 3d15f3db17ec6b Steve French 2020-10-22 3132 ioctl_rsp = rsp_iov[1].iov_base; 3d15f3db17ec6b Steve French 2020-10-22 3133 3d15f3db17ec6b Steve French 2020-10-22 3134 /* 3d15f3db17ec6b Steve French 2020-10-22 3135 * Open was successful and we got an ioctl response. 3d15f3db17ec6b Steve French 2020-10-22 3136 */ 3d15f3db17ec6b Steve French 2020-10-22 3137 if (rc == 0) { 3d15f3db17ec6b Steve French 2020-10-22 3138 /* See MS-FSCC 2.3.23 */ 3d15f3db17ec6b Steve French 2020-10-22 3139 3d15f3db17ec6b Steve French 2020-10-22 3140 reparse_buf = (struct reparse_data_buffer *) 3d15f3db17ec6b Steve French 2020-10-22 3141 ((char *)ioctl_rsp + 3d15f3db17ec6b Steve French 2020-10-22 3142 le32_to_cpu(ioctl_rsp->OutputOffset)); 3d15f3db17ec6b Steve French 2020-10-22 3143 plen = le32_to_cpu(ioctl_rsp->OutputCount); 3d15f3db17ec6b Steve French 2020-10-22 3144 3d15f3db17ec6b Steve French 2020-10-22 3145 if (plen + le32_to_cpu(ioctl_rsp->OutputOffset) > 3d15f3db17ec6b Steve French 2020-10-22 3146 rsp_iov[1].iov_len) { 3d15f3db17ec6b Steve French 2020-10-22 3147 cifs_tcon_dbg(FYI, "srv returned invalid ioctl len: %d\n", 3d15f3db17ec6b Steve French 2020-10-22 3148 plen); 3d15f3db17ec6b Steve French 2020-10-22 3149 rc = -EIO; 3d15f3db17ec6b Steve French 2020-10-22 3150 goto query_rp_exit; 3d15f3db17ec6b Steve French 2020-10-22 3151 } 3d15f3db17ec6b Steve French 2020-10-22 3152 *tag = le32_to_cpu(reparse_buf->ReparseTag); 3d15f3db17ec6b Steve French 2020-10-22 3153 } 3d15f3db17ec6b Steve French 2020-10-22 3154 3d15f3db17ec6b Steve French 2020-10-22 3155 query_rp_exit: 3d15f3db17ec6b Steve French 2020-10-22 3156 kfree(utf16_path); 3d15f3db17ec6b Steve French 2020-10-22 3157 SMB2_open_free(&rqst[0]); 3d15f3db17ec6b Steve French 2020-10-22 3158 SMB2_ioctl_free(&rqst[1]); 3d15f3db17ec6b Steve French 2020-10-22 3159 SMB2_close_free(&rqst[2]); 3d15f3db17ec6b Steve French 2020-10-22 3160 free_rsp_buf(resp_buftype[0], rsp_iov[0].iov_base); 3d15f3db17ec6b Steve French 2020-10-22 3161 free_rsp_buf(resp_buftype[1], rsp_iov[1].iov_base); 3d15f3db17ec6b Steve French 2020-10-22 3162 free_rsp_buf(resp_buftype[2], rsp_iov[2].iov_base); 3d15f3db17ec6b Steve French 2020-10-22 3163 return rc; 3d15f3db17ec6b Steve French 2020-10-22 3164 } 3d15f3db17ec6b Steve French 2020-10-22 3165 :::::: The code at line 3055 was first introduced by commit :::::: 3d15f3db17ec6bd0bb8c73b2e38bd4e0e8ba0066 smb3: add support for stat of WSL reparse points for special file types :::::: TO: Steve French <stfrench@xxxxxxxxxxxxx> :::::: CC: Steve French <stfrench@xxxxxxxxxxxxx> --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx
Attachment:
.config.gz
Description: application/gzip