title: easy way to detect infinite loop in kernel of the linux
body: <p>I've just spent my 2 extra hours trying to find bug in my modification of the kernel of the linux, every time when I was connecting module to the kernel it was good but when I unconnected it my mouse stopped to work, so using printk I found infinite loop, my question is does somebody know nice techniques to detect such bugs, sometimes it is difficult to find such loops, and linux becomes unpredictable, <code>so how can I avoid infinite loops</code> in kernel thanks in advance</p>