CC: [email protected] CC: [email protected] CC: [email protected] TO: Alexander Aring <[email protected]> CC: David Teigland <[email protected]>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/teigland/linux-dlm.git next head: 62699b3f0a62435fceb8debf295e90a5ea259e04 commit: c51b0221798b695ac1beac6597d3a0acf039384b [11/12] fs: dlm: fix multiple empty writequeue alloc :::::: branch date: 27 hours ago :::::: commit date: 27 hours ago config: x86_64-randconfig-c002-20210720 (attached as .config) compiler: gcc-10 (Ubuntu 10.3.0-1ubuntu1~20.04) 10.3.0 If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot <[email protected]> Reported-by: Julia Lawall <[email protected]> cocci warnings: (new ones prefixed by >>) >> fs/dlm/lowcomms.c:1282:2-8: preceding lock on line 1272 vim +1282 fs/dlm/lowcomms.c f0747ebf48f362 Alexander Aring 2021-03-01 1249 2874d1a68c4ec5 Alexander Aring 2021-05-21 1250 static struct dlm_msg *dlm_lowcomms_new_msg_con(struct connection *con, int len, 2874d1a68c4ec5 Alexander Aring 2021-05-21 1251 gfp_t allocation, char **ppc, 2874d1a68c4ec5 Alexander Aring 2021-05-21 1252 void (*cb)(struct dlm_mhandle *mh), 2874d1a68c4ec5 Alexander Aring 2021-05-21 1253 struct dlm_mhandle *mh) 2874d1a68c4ec5 Alexander Aring 2021-05-21 1254 { 2874d1a68c4ec5 Alexander Aring 2021-05-21 1255 struct writequeue_entry *e; 2874d1a68c4ec5 Alexander Aring 2021-05-21 1256 struct dlm_msg *msg; c51b0221798b69 Alexander Aring 2021-07-16 1257 bool sleepable; 2874d1a68c4ec5 Alexander Aring 2021-05-21 1258 2874d1a68c4ec5 Alexander Aring 2021-05-21 1259 msg = kzalloc(sizeof(*msg), allocation); 2874d1a68c4ec5 Alexander Aring 2021-05-21 1260 if (!msg) 2874d1a68c4ec5 Alexander Aring 2021-05-21 1261 return NULL; 2874d1a68c4ec5 Alexander Aring 2021-05-21 1262 c51b0221798b69 Alexander Aring 2021-07-16 1263 /* this mutex is being used as a wait to avoid multiple "fast" c51b0221798b69 Alexander Aring 2021-07-16 1264 * new writequeue page list entry allocs in new_wq_entry in c51b0221798b69 Alexander Aring 2021-07-16 1265 * normal operation which is sleepable context. Without it c51b0221798b69 Alexander Aring 2021-07-16 1266 * we could end in multiple writequeue entries with one c51b0221798b69 Alexander Aring 2021-07-16 1267 * dlm message because multiple callers were waiting at c51b0221798b69 Alexander Aring 2021-07-16 1268 * the writequeue_lock in new_wq_entry(). c51b0221798b69 Alexander Aring 2021-07-16 1269 */ c51b0221798b69 Alexander Aring 2021-07-16 1270 sleepable = gfpflags_normal_context(allocation); c51b0221798b69 Alexander Aring 2021-07-16 1271 if (sleepable) c51b0221798b69 Alexander Aring 2021-07-16 @1272 mutex_lock(&con->wq_alloc); c51b0221798b69 Alexander Aring 2021-07-16 1273 2874d1a68c4ec5 Alexander Aring 2021-05-21 1274 kref_init(&msg->ref); 2874d1a68c4ec5 Alexander Aring 2021-05-21 1275 2874d1a68c4ec5 Alexander Aring 2021-05-21 1276 e = new_wq_entry(con, len, allocation, ppc, cb, mh); 2874d1a68c4ec5 Alexander Aring 2021-05-21 1277 if (!e) { c51b0221798b69 Alexander Aring 2021-07-16 1278 if (sleepable) c51b0221798b69 Alexander Aring 2021-07-16 1279 mutex_unlock(&con->wq_alloc); c51b0221798b69 Alexander Aring 2021-07-16 1280 2874d1a68c4ec5 Alexander Aring 2021-05-21 1281 kfree(msg); 2874d1a68c4ec5 Alexander Aring 2021-05-21 @1282 return NULL; 2874d1a68c4ec5 Alexander Aring 2021-05-21 1283 } 2874d1a68c4ec5 Alexander Aring 2021-05-21 1284 c51b0221798b69 Alexander Aring 2021-07-16 1285 if (sleepable) c51b0221798b69 Alexander Aring 2021-07-16 1286 mutex_unlock(&con->wq_alloc); c51b0221798b69 Alexander Aring 2021-07-16 1287 2874d1a68c4ec5 Alexander Aring 2021-05-21 1288 msg->ppc = *ppc; 2874d1a68c4ec5 Alexander Aring 2021-05-21 1289 msg->len = len; 2874d1a68c4ec5 Alexander Aring 2021-05-21 1290 msg->entry = e; 2874d1a68c4ec5 Alexander Aring 2021-05-21 1291 2874d1a68c4ec5 Alexander Aring 2021-05-21 1292 return msg; 2874d1a68c4ec5 Alexander Aring 2021-05-21 1293 } 2874d1a68c4ec5 Alexander Aring 2021-05-21 1294 :::::: The code at line 1282 was first introduced by commit :::::: 2874d1a68c4ec5623a05c8118f5dbaefb30b37ff fs: dlm: add functionality to re-transmit a message :::::: TO: Alexander Aring <[email protected]> :::::: CC: David Teigland <[email protected]> --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/[email protected]
.config.gz
Description: application/gzip
_______________________________________________ kbuild mailing list -- [email protected] To unsubscribe send an email to [email protected]
