All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
* [dlm:next 11/12] fs/dlm/lowcomms.c:1282:2-8: preceding lock on line 1272
@ 2021-07-20 19:31 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2021-07-20 19:31 UTC (permalink / raw
  To: kbuild

[-- Attachment #1: Type: text/plain, Size: 4664 bytes --]

CC: kbuild-all(a)lists.01.org
CC: cluster-devel(a)redhat.com
CC: linux-kernel(a)vger.kernel.org
TO: Alexander Aring <aahringo@redhat.com>
CC: David Teigland <teigland@redhat.com>

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 <lkp@intel.com>
Reported-by: Julia Lawall <julia.lawall@lip6.fr>


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 <aahringo@redhat.com>
:::::: CC: David Teigland <teigland@redhat.com>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 50765 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-07-20 19:31 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-07-20 19:31 [dlm:next 11/12] fs/dlm/lowcomms.c:1282:2-8: preceding lock on line 1272 kernel test robot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.