what is the issue if bottom halfs are enabled in the interrupt context

187 Views Asked by At

There's a safety check, kind of warning message "Badness in local_bh_enable at kernel/softirq.c:140" in the local_bh_enable() function, that dumps the stack trace if the function is called in the interrupt context. What happens if bottom halfs are enabled in the interrupt context? Does they affect the system execution path?

1

There are 1 best solutions below

1
On

Bottom halves are deferred interrupt processing, to be done outside of interrupt context. If they were inadvertently enabled within interrupt context you could end up with very strange behavior, loss of data, malfunctioning hardware, etc. since the bottom half would try to run while the top half (interrupt handler) has not finished placing the hardware in a good state, pulling register state or masking interrupts.