From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933034AbcBPQIH (ORCPT ); Tue, 16 Feb 2016 11:08:07 -0500 Received: from mail-yk0-f173.google.com ([209.85.160.173]:33622 "EHLO mail-yk0-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932230AbcBPQIF (ORCPT ); Tue, 16 Feb 2016 11:08:05 -0500 Date: Tue, 16 Feb 2016 11:08:01 -0500 From: Tejun Heo 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@kvack.org, Vlastimil Babka , linux-api@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v4 04/22] kthread: Add create_kthread_worker*() 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 Content-Disposition: inline In-Reply-To: <20160216154443.GW12548@pathway.suse.cz> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@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