Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751942AbbDSJbV (ORCPT ); Sun, 19 Apr 2015 05:31:21 -0400 Received: from mail-wg0-f49.google.com ([74.125.82.49]:34683 "EHLO mail-wg0-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751315AbbDSJbR (ORCPT ); Sun, 19 Apr 2015 05:31:17 -0400 Date: Sun, 19 Apr 2015 11:31:13 +0200 From: Ingo Molnar To: Linus Torvalds Cc: Rabin Vincent , Linux Kernel Mailing List , Guenter Roeck , Peter Zijlstra , Thomas Gleixner , "Paul E. McKenney" Subject: Re: qemu:arm test failure due to commit 8053871d0f7f (smp: Fix smp_call_function_single_async() locking) Message-ID: <20150419093112.GA6139@gmail.com> References: <20150418232325.GA22411@roeck-us.net> <20150418234050.GA5987@roeck-us.net> <55330B32.4010907@roeck-us.net> <20150419033940.GA25145@debian> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1249 Lines: 45 * Linus Torvalds wrote: > On Sun, Apr 19, 2015 at 4:48 AM, Linus Torvalds > wrote: > > > > Does that smaller patch work equally well? > > .. and here's a properly formatted email and patch. > > Linus > kernel/smp.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/kernel/smp.c b/kernel/smp.c > index 2aaac2c47683..07854477c164 100644 > --- a/kernel/smp.c > +++ b/kernel/smp.c > @@ -159,8 +159,10 @@ static int generic_exec_single(int cpu, struct call_single_data *csd, > } > > > - if ((unsigned)cpu >= nr_cpu_ids || !cpu_online(cpu)) > + if ((unsigned)cpu >= nr_cpu_ids || !cpu_online(cpu)) { > + csd_unlock(csd); > return -ENXIO; > + } Acked-by: Ingo Molnar Btw., in this case we should probably also generate a WARN_ONCE() warning? I _think_ most such callers calling an SMP function call for offline or out of range CPUs are at minimum racy. Thanks, Ingo -- 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/