From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752736AbcI3Kf7 (ORCPT ); Fri, 30 Sep 2016 06:35:59 -0400 Received: from bombadil.infradead.org ([198.137.202.9]:37119 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751894AbcI3Kfx (ORCPT ); Fri, 30 Sep 2016 06:35:53 -0400 Date: Fri, 30 Sep 2016 12:35:49 +0200 From: Peter Zijlstra To: kernel test robot Cc: Con Kolivas , Ingo Molnar , Alfred Chen , LKML , Stephen Rothwell , lkp@01.org Subject: Re: [lkp] [sched/core] 4fa5cd5245: BUG: sleeping function called from invalid context at kernel/locking/mutex.c:97 Message-ID: <20160930103549.GH5016@twins.programming.kicks-ass.net> References: <20160930015102.GB20189@yexl-desktop> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160930015102.GB20189@yexl-desktop> User-Agent: Mutt/1.5.23.1 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Sep 30, 2016 at 09:51:02AM +0800, kernel test robot wrote: > > FYI, we noticed the following commit: > > https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master > commit 4fa5cd5245b627db88c9ca08ae442373b02596b4 ("sched/core: Do not use smp_processor_id() with preempt enabled in smpboot_thread_fn()") > So its perfectly ok to use smp_processor_id() in preemptible context, assuming the task is pinned to one cpu. smpboot threads are per definition per-cpu threads, those are bound to a specific CPU and affinity cannot be changed by userspace.