An easy way to detect an infinite loop in the Linux kernel

I just spent 2 extra hours trying to find an error in my modification of the Linux kernel, every time I connected the module to the kernel, it was fine, but when I disconnected it, my mouse stopped working, so using printk I found an infinite cycle, my question is that someone knows good methods for detecting such errors, sometimes it is difficult to find such cycles, and linux becomes unpredictable, so how can I avoid infinite loopsin advance in the kernel

+3
source share
3 answers

There is some infrastructure in the kernel that allows you to detect some blocking conditions:

CONFIG_DETECT_SOFTLOCKUP

CONFIG_DETECT_HUNG_TASK

, Kernel Hacking

+3

printk , .

​​ Bochs . , , gdb. Google .


, "" ""... , - : ^)

, . () , - usermode . , , . LynxOS, - ANSI . -, -, , escape- , . , , , , . usermode .

0
0

All Articles