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
so how can I avoid infinite loops
There is some infrastructure in the kernel that allows you to detect some blocking conditions:
CONFIG_DETECT_SOFTLOCKUP
CONFIG_DETECT_HUNG_TASK
, Kernel Hacking
printk , .
Bochs . , , gdb. Google .
, . () , - usermode . , , . LynxOS, - ANSI . -, -, , escape- , . , , , , . usermode .
NMI.