Hi- I'm wanting to use an assert() equivalent in my kernel (C) code. AFAIK there isn't a standard one (please correct me if I'm wrong), and while it's not difficult to write something that printk's an appropriate message, what happens next?

That is, I don't want the code to continue after a failed assertion (eg. it will access a NULL pointer), the code can't exit(), and if it goes into a loop:
for (;;) schedule;
then I can't rmmod it or shut down cleanly.

Any ideas?