Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Mon, 17 Feb 2003 09:40:37 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Mon, 17 Feb 2003 09:37:02 -0500 Received: from mx1.elte.hu ([157.181.1.137]:16103 "HELO mx1.elte.hu") by vger.kernel.org with SMTP id ; Mon, 17 Feb 2003 09:08:42 -0500 Date: Mon, 17 Feb 2003 15:17:37 +0100 (CET) From: Ingo Molnar Reply-To: Ingo Molnar To: Zwane Mwaikambo Cc: Linux Kernel , Robert Love , Linus Torvalds Subject: Re: [PATCH][2.5] set_cpus_allowed needs cpu_online_map BUG check In-Reply-To: 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: 946 Lines: 33 On Mon, 17 Feb 2003, Zwane Mwaikambo wrote: > We don't want to try and migrate to offline cpus, so BUG() on it. agreed. Not much code should be exposed to the possibility of CPUs going away. Ingo > diff -u -r1.1.1.1 sched.c > --- linux-2.5.61-trojan/kernel/sched.c 15 Feb 2003 12:32:44 -0000 1.1.1.1 > +++ linux-2.5.61-trojan/kernel/sched.c 15 Feb 2003 16:04:51 -0000 > @@ -2200,11 +2221,8 @@ > migration_req_t req; > runqueue_t *rq; > > -#if 0 /* FIXME: Grab cpu_lock, return error on this case. --RR */ > - new_mask &= cpu_online_map; > - if (!new_mask) > + if (!(new_mask & cpu_online_map)) > BUG(); > -#endif > > rq = task_rq_lock(p, &flags); > p->cpus_allowed = new_mask; > - 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/