Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753876Ab1BHMOZ (ORCPT ); Tue, 8 Feb 2011 07:14:25 -0500 Received: from mail-pw0-f46.google.com ([209.85.160.46]:56058 "EHLO mail-pw0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753778Ab1BHMOX (ORCPT ); Tue, 8 Feb 2011 07:14:23 -0500 DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:cc:subject:message-id:reply-to:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; b=XpQkVN59y65+50qDAEX/vqBhF8UgI/SJGaI7xFyA6Bv9lwrP9c4TFm45RYVSRuReux +YwYEPliZAIuWCZ9Z0WAOceYUcx/5DcPjv5otn2goVJWbXQh2c04v1eTBm0ThWwBBxW/ oa9SqLkb3UET4UdTKJz3z6v0B4Gj2xG75+154= Date: Tue, 8 Feb 2011 20:14:10 +0800 From: Yong Zhang To: Peter Zijlstra Cc: Borislav Petkov , Linus Torvalds , Linux Kernel Mailing List , x86@kernel.org, tglx , Ingo Molnar , Andrew Morton , Peter Zijlstra Subject: [PATCH 2/2] timer: use local_bh_enable_force_wake() in del_timer_sync() Message-ID: <20110208121410.GB4824@zhy> Reply-To: Yong Zhang References: <20110208101730.GB7020@liondog.tnic> <1297161712.13327.100.camel@laptop> <20110208121108.GA4824@zhy> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20110208121108.GA4824@zhy> User-Agent: Mutt/1.5.20 (2009-06-14) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1500 Lines: 45 From: Yong Zhang Subject: [PATCH 2/2] timer: use local_bh_enable_force_wake() in del_timer_sync() raw_local_irq_save()/raw_local_irq_restore() is also not suitable here because lockdep will report "possible reason: unannotated irqs-off" To cure this issue, use local_bh_enable_force_wake() here in case of we have pending softirq left during this time. Reported-by: Borislav Petkov Signed-off-by: Yong Zhang Cc: Andrew Morton Cc: Thomas Gleixner Cc: Peter Zijlstra --- kernel/timer.c | 6 +----- 1 files changed, 1 insertions(+), 5 deletions(-) diff --git a/kernel/timer.c b/kernel/timer.c index d53ce66..1654dc1 100644 --- a/kernel/timer.c +++ b/kernel/timer.c @@ -969,14 +969,10 @@ EXPORT_SYMBOL(try_to_del_timer_sync); int del_timer_sync(struct timer_list *timer) { #ifdef CONFIG_LOCKDEP - unsigned long flags; - - raw_local_irq_save(flags); local_bh_disable(); lock_map_acquire(&timer->lockdep_map); lock_map_release(&timer->lockdep_map); - _local_bh_enable(); - raw_local_irq_restore(flags); + local_bh_enable_force_wake(); #endif /* * don't use it in hardirq context, because it -- 1.7.1 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/