Quantcast
Channel: Active questions tagged kernel - Stack Overflow
Viewing all articles
Browse latest Browse all 6369

What happens if I don't call free_irq() in the driver's exit function?

$
0
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.


Viewing all articles
Browse latest Browse all 6369

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>