locking: save held locks in caller_info table
commit75bdc670a9aed8e1c879aa865434662a91cdc719
authorDan Carpenter <dan.carpenter@oracle.com>
Fri, 13 Nov 2020 13:05:38 +0000 (13 16:05 +0300)
committerDan Carpenter <dan.carpenter@oracle.com>
Fri, 13 Nov 2020 13:05:38 +0000 (13 16:05 +0300)
treed0e8eb16a5e473650e57b99e6909791b2317d364
parent73c930ff350e1c7c073afbb2003bacb15ad73b93
locking: save held locks in caller_info table

This is some code that I've been working on and it's not 100% perfect...
The main problem is that it leads to a lot of "double lock/unlock" false
positives.  So I have commented out that warning for now.

There is a lot of code in this patch.  It's difficult to separate out and
commit in multiple patches.  I've added some RCU locking checks.

I've changed the reset() modification hook to ignore some things.  The
problem was that if you have p = take_some_lock(); then p->lock was set to
locked and then immediately cleared.

A lot of locks are nestable like irq_save() and bottom halves.  There is
a bunch of code to handle irq_save() nesting.

Another thing is that I wrote some code to prevent recording that a lock
was taken or released twice.  I'm not sure that code is required.  That was
related to a lock state that was inserted manually and I have fixed that
bug...

Anyway, I want to commit this because it's a lot of code and it is becoming
unwieldy and also because I want to re-write the lock table based on what
I have learned from check_unwind.c.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
check_locking.c