[ The fs/cifsd/ directory needs to be added to the MAINTAINERS file so this stuff goes through linux-cifs@xxxxxxxxxxxxxxx ] Hello Namjae Jeon, The patch cabcebc31de4: "cifsd: introduce SMB3 kernel server" from May 14, 2020, leads to the following static checker warning: fs/cifsd/transport_rdma.c:1168 smb_direct_post_send_data() warn: missing error code 'ret' fs/cifsd/transport_rdma.c 1150 1151 ret = smb_direct_create_header(t, data_length, remaining_data_length, 1152 &msg); 1153 if (ret) { 1154 atomic_inc(&t->send_credits); 1155 return ret; 1156 } "ret" is zero. 1157 1158 for (i = 0; i < niov; i++) { 1159 struct ib_sge *sge; 1160 int sg_cnt; 1161 1162 sg_init_table(sg, SMB_DIRECT_MAX_SEND_SGES-1); 1163 sg_cnt = get_mapped_sg_list(t->cm_id->device, 1164 iov[i].iov_base, iov[i].iov_len, 1165 sg, SMB_DIRECT_MAX_SEND_SGES-1, DMA_TO_DEVICE); 1166 if (sg_cnt <= 0) { 1167 ksmbd_err("failed to map buffer\n"); 1168 goto err; Should ret = -ENOMEM on this path? 1169 } else if (sg_cnt + msg->num_sge > SMB_DIRECT_MAX_SEND_SGES-1) { 1170 ksmbd_err("buffer not fitted into sges\n"); 1171 ret = -E2BIG; 1172 ib_dma_unmap_sg(t->cm_id->device, sg, sg_cnt, 1173 DMA_TO_DEVICE); 1174 goto err; 1175 } 1176 1177 for (j = 0; j < sg_cnt; j++) { 1178 sge = &msg->sge[msg->num_sge]; 1179 sge->addr = sg_dma_address(&sg[j]); 1180 sge->length = sg_dma_len(&sg[j]); 1181 sge->lkey = t->pd->local_dma_lkey; 1182 msg->num_sge++; 1183 } 1184 } 1185 1186 ret = post_sendmsg(t, send_ctx, msg); 1187 if (ret) 1188 goto err; 1189 return 0; 1190 err: 1191 smb_direct_free_sendmsg(t, msg); 1192 atomic_inc(&t->send_credits); 1193 return ret; 1194 } regards, dan carpenter