* Linus Torvalds <torva...@linux-foundation.org> wrote: > On Sun, Apr 19, 2015 at 4:48 AM, Linus Torvalds > <torva...@linux-foundation.org> 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 <mi...@kernel.org> 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 majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/