From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tejun Heo Subject: Re: [PATCH v4 04/22] kthread: Add create_kthread_worker*() Date: Tue, 16 Feb 2016 11:08:01 -0500 Message-ID: <20160216160801.GM3741@mtj.duckdns.org> References: <1453736711-6703-1-git-send-email-pmladek@suse.com> <1453736711-6703-5-git-send-email-pmladek@suse.com> <20160125185339.GB3628@mtj.duckdns.org> <20160216154443.GW12548@pathway.suse.cz> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <20160216154443.GW12548-KsEp0d+Q8qECVLCxKZUutA@public.gmane.org> Sender: linux-api-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Petr Mladek Cc: Andrew Morton , Oleg Nesterov , Ingo Molnar , Peter Zijlstra , Steven Rostedt , "Paul E. McKenney" , Josh Triplett , Thomas Gleixner , Linus Torvalds , Jiri Kosina , Borislav Petkov , Michal Hocko , linux-mm-Bw31MaZKKs3YtjvyW6yDsg@public.gmane.org, Vlastimil Babka , linux-api-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-Id: linux-api@vger.kernel.org Hello, On Tue, Feb 16, 2016 at 04:44:43PM +0100, Petr Mladek wrote: > I wanted to be sure. The cpu number is later passed to > cpu_to_node(cpu) in kthread_create_on_cpu(). > > I am going to replace this with a check against nr_cpu_ids in > kthread_create_on_cpu() which makes more sense. > > I might be too paranoid. But this is slow path. People > do mistakes... idk, that just ended up adding a subtly broken code which checks for an unlikely condition which would cause a crash anyway. I don't see the point. If you want to insist on it, please at least make it a WARN_ON(). It's a clear kernel bug. Thanks. -- tejun