0

So, I wrote a basic char driver with IRQ_NO 1 for keyboard and registered a shared handler function for it. In this exit function I don't free the handler using free_irq(). In the dmesg logs I can see that the exit_function gets exectued successfully (when I do rmmod) but immediately after that the entire system freezes. With some other interrupt number (let's say 6) the system doesn't immediately freezes but eventually it does if I do cat /proc/interrupts/ or try to insert the driver again using insmod.

I know I should free the handler but I want to know where exactly the problem occurs if I don't free the handler.

agenius5
  • 21
  • 1
  • 5
  • So, you left a dangling pointer in the list of attached actions to the certain vIRQ. What do you expect? Any IRQ on the same line will follow dangling pointer and who-knows-what may happen after that. – 0andriy Sep 22 '21 at 17:23
  • Yes, a lot can go wrong. I agree. My task was to figure out the places where things can go wrong so to understand the kernel code and insides of kernel – agenius5 Sep 23 '21 at 19:10
  • I didn't get what you are talking about. The dangling pointer is ask for troubles. That's it. It's **already** wrong. – 0andriy Sep 23 '21 at 20:53

0 Answers0