Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Mon, 16 Sep 2002 19:40:40 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Mon, 16 Sep 2002 19:40:40 -0400 Received: from neon-gw-l3.transmeta.com ([63.209.4.196]:24335 "EHLO neon-gw.transmeta.com") by vger.kernel.org with ESMTP id ; Mon, 16 Sep 2002 19:40:39 -0400 Date: Mon, 16 Sep 2002 16:45:58 -0700 (PDT) From: Linus Torvalds To: Robert Love cc: linux-kernel@vger.kernel.org Subject: Re: [PATCH] BUG(): sched.c: Line 944 In-Reply-To: <1032218110.1203.63.camel@phantasy> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 767 Lines: 21 On 16 Sep 2002, Robert Love wrote: > > Nope. If PREEMPT_ACTIVE is set, schedule() assumes the task is being > preempted and skips certain logic e.g. deactivate_task() (this is the > same code that lets us safely preempt a TASK_ZOMBIE). Ahhah! I know. You just make lock_depth 0 when you exit, without actually taking the kernel lock. Which fools the logic into accepting a preempt-disable, since it thinks that the preempt disable is due to holding the kernel lock. Add a big comment and you're all done. Linus - 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/