From patchwork Fri Aug 21 21:24:17 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Alexey Starikovskiy X-Patchwork-Id: 43225 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n7LLOLip006625 for ; Fri, 21 Aug 2009 21:24:21 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932528AbZHUVYS (ORCPT ); Fri, 21 Aug 2009 17:24:18 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S932731AbZHUVYS (ORCPT ); Fri, 21 Aug 2009 17:24:18 -0400 Received: from charybdis-ext.suse.de ([195.135.221.2]:40121 "EHLO emea5-mh.id5.novell.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S932528AbZHUVYR (ORCPT ); Fri, 21 Aug 2009 17:24:17 -0400 Received: from [192.168.101.190] ([149.44.162.75]) by emea5-mh.id5.novell.com with ESMTP; Fri, 21 Aug 2009 23:24:16 +0200 Message-ID: <4A8F1081.3020803@suse.de> Date: Sat, 22 Aug 2009 01:24:17 +0400 From: Alexey Starikovskiy User-Agent: Thunderbird 2.0.0.22 (X11/20090608) MIME-Version: 1.0 To: Eric Paris CC: linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org, len.brown@intel.com Subject: Re: BUG: scheduling while atomic in acpi_ps_complete_op References: <1250873707.2168.38.camel@dhcp231-106.rdu.redhat.com> <4A8EFFB2.4040100@suse.de> <1250886352.2168.83.camel@dhcp231-106.rdu.redhat.com> In-Reply-To: <1250886352.2168.83.camel@dhcp231-106.rdu.redhat.com> Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org Eric Paris пишет: > On Sat, 2009-08-22 at 00:12 +0400, Alexey Starikovskiy wrote: >> Hi, >> This should be handled by abe1dfab60e1839d115930286cb421f5a5b193f3. > > And yet I'm getting it from linux-next today. > > So you are apparently failing the in_atomic_preempt_off() test but > succeeding in your !irqs_disabled() test. > > Something isn't right since I'm hitting it hundreds of times on boot. > > -Eric > Ok, let's see if replacing irqs_disabled() to in_atomic_preempt_off() helps... Regards, Alex. diff --git a/include/acpi/platform/aclinux.h b/include/acpi/platform/aclinux.h index fcb8e4b..23b262b 100644 --- a/include/acpi/platform/aclinux.h +++ b/include/acpi/platform/aclinux.h @@ -152,7 +152,7 @@ static inline void *acpi_os_acquire_object(acpi_cache_t * cache) #define ACPI_PREEMPTION_POINT() \ do { \ - if (!irqs_disabled()) \ + if (!in_atomic_preempt_off()) \ cond_resched(); \ } while (0)