lkml.org 
[lkml]   [2012]   [Jul]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] [ARM] Unconditional call to smp_cross_call on UP crashes (take #2)
On Fri, Jul 13, 2012 at 08:59:39AM +0100, Shawn Guo wrote:
> > diff --git a/arch/arm/kernel/smp.c b/arch/arm/kernel/smp.c
> > index 8f46446..7babc3f 100644
> > --- a/arch/arm/kernel/smp.c
> > +++ b/arch/arm/kernel/smp.c
> > @@ -590,7 +590,8 @@ void smp_send_stop(void)
> >
> > cpumask_copy(&mask, cpu_online_mask);
> > cpumask_clear_cpu(smp_processor_id(), &mask);
> > - smp_cross_call(&mask, IPI_CPU_STOP);
> > + if (!cpumask_empty(&mask))
> > + smp_cross_call(&mask, IPI_CPU_STOP);

I wonder whether we shouldn't have a default smp_cross_call implementation
with BUG_ON(!cpumask_empty(&mask)). It's marginally nicer than an explicit NULL
deference and it would also fix your problem.

Will


\
 
 \ /
  Last update: 2012-07-16 14:01    [W:0.027 / U:1.284 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site