2
votes

I am writing an assignment (so I'm under lots of pressure, hehe) and I have a particular place where my project is dereferencing NULL.

The details are this: it's a system call that walks the page table entries of this process and reports which were accessed since the call last happened. Please do no give suggestions about the problem itself, as I don't want to violate any academic honesty rules.

It seems to be the case, however, that the execution of the system call is preempted, and something goes in and screws with the structures I'm using. The infuriating thing is that I can't figure out what.

Therefore, I want the panic to tell me what spinlocks/semaphores, etc. are being held at the time of the panic. This would give me a hint as to what the hell is going on.

1

1 Answers

3
votes

If you build your kernel with CONFIG_LOCKDEP enabled you should be able to dump all locks with alt-sysrq-D. See drivers/tty/sysrq.c.