lkml.org 
[lkml]   [2013]   [Jan]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v4] lib: cpu_rmap: avoid flushing all workqueues
On 02/01/2013 23:52, David Decotigny wrote:
> In some cases, free_irq_cpu_rmap() is called while holding a lock
> (eg. rtnl). This can lead to deadlocks, because it invokes
> flush_scheduled_work() which ends up waiting for whole system
> workqueue to flush, but some pending works might try to acquire the
> lock we are already holding.
>
> This commit uses reference-counting to replace
> irq_run_affinity_notifiers(). It also removes
> irq_run_affinity_notifiers() altogether.
>
> Signed-off-by: David Decotigny<decot@googlers.com>
> ---
> include/linux/cpu_rmap.h | 13 +++-------
> include/linux/interrupt.h | 5 ----
> lib/cpu_rmap.c | 63 +++++++++++++++++++++++++++++++++++++++++----
> 3 files changed, 62 insertions(+), 19 deletions(-)
>

Acked-by: Amir Vadai <amirv@mellano.com>


\
 
 \ /
  Last update: 2013-01-07 14:42    [W:0.161 / U:0.176 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site