summaryrefslogtreecommitdiff
path: root/include/linux/clk-provider.h
diff options
context:
space:
mode:
authorEdward Cree <ecree@solarflare.com>2020-03-13 20:33:07 +0000
committerThomas Gleixner <tglx@linutronix.de>2020-03-21 17:32:46 +0100
commitdf81dfcfd6991d547653d46c051bac195cd182c1 (patch)
tree5a6ed7725d8a3b3d1fbe73e33265b3a00ee1217b /include/linux/clk-provider.h
parent5ad0ec0b86525d0c5d3d250d3cfad7f183b00cfa (diff)
genirq: Fix reference leaks on irq affinity notifiers
The handling of notify->work did not properly maintain notify->kref in two cases: 1) where the work was already scheduled, another irq_set_affinity_locked() would get the ref and (no-op-ly) schedule the work. Thus when irq_affinity_notify() ran, it would drop the original ref but not the additional one. 2) when cancelling the (old) work in irq_set_affinity_notifier(), if there was outstanding work a ref had been got for it but was never put. Fix both by checking the return values of the work handling functions (schedule_work() for (1) and cancel_work_sync() for (2)) and put the extra ref if the return value indicates preexisting work. Fixes: cd7eab44e994 ("genirq: Add IRQ affinity notifiers") Fixes: 59c39840f5ab ("genirq: Prevent use-after-free and work list corruption") Signed-off-by: Edward Cree <ecree@solarflare.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Acked-by: Ben Hutchings <ben@decadent.org.uk> Link: https://lkml.kernel.org/r/24f5983f-2ab5-e83a-44ee-a45b5f9300f5@solarflare.com
Diffstat (limited to 'include/linux/clk-provider.h')
0 files changed, 0 insertions, 0 deletions