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>