Whamcloud - gitweb
LU-16807 libcfs: give the tcd_lock types different classes. 92/50992/3
authorMr NeilBrown <neilb@suse.de>
Fri, 20 Nov 2020 02:19:49 +0000 (13:19 +1100)
committerOleg Drokin <green@whamcloud.com>
Wed, 31 May 2023 19:15:01 +0000 (19:15 +0000)
commit7393c5a57876309863aebc7f87eba966ebbec320
tree475a17549f9d27875c5d989fdde3967eefde8c82
parent4cd4bfba473fb370767e1f2014d9fe1531889f82
LU-16807 libcfs: give the tcd_lock types different classes.

There are three different trace contexts:
   process, softirq, irq.
Each has its own lock (tcd_lock) which is locked as appropriate for
that context.

lockdep currently doesn't see that they are different and so deduces
that the different uses might lead to deadlocks.

So use separate calls to spin_lock_init() so that they each get a
separate lock class, and lockdep sees no problem.

Test-Parameters: trivial testlist=sanity-lnet
Signed-off-by: Mr NeilBrown <neilb@suse.de>
Change-Id: Icca7706d8e0d8ae8add4c540d2da090b53d7e65c
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50992
Tested-by: Maloo <maloo@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Chris Horn <chris.horn@hpe.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
libcfs/libcfs/tracefile.c