[PATCH 5.1 12/30] genirq: Prevent use-after-free and work list corruption