lkml.org 
[lkml]   [2010]   [Apr]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: BUG: null pointer deref in dmar_ir_support

* Suresh Siddha <suresh.b.siddha@intel.com> wrote:

> On Fri, 2010-04-02 at 11:20 -0700, Ingo Molnar wrote:
> > * Suresh Siddha <suresh.b.siddha@intel.com> wrote:
> >
> > > @@ -1640,8 +1640,10 @@ int __init APIC_init_uniprocessor(void)
> > > }
> > > #endif
> > >
> > > +#ifndef CONFIG_SMP
> > > enable_IR_x2apic();
> > > default_setup_apic_routing();
> > > +#endif
> >
> > Instead of adding yet another ugly #ifdef please hide these details
> > properly, by making enable_IR_x2apic() and default_setup_apic_routing() a
> > NOP on !SMP.
>
> Ingo, These are not nops on !SMP. We should call these functions from
> APIC_init_uniprocessor() only if it is a UP kernel. For SMP kernel they are
> called from some where else.

Btw., that makes the cleanliness situation even worse ...

> With the current code, on SMP and with non SMP motherboard we were calling
> these routines twice which cause problem.
>
> I wanted to keep the patch simple for urgent/backport. I will clean this by
> restructuring the init code for 2.6.35

Ok, fair enough, i'll queue up this fix.

The best structure would be to integrate these init details into the APIC
driver methods and make UP-IOAPIC nothing particularly special.

Thanks,

Ingo


\
 
 \ /
  Last update: 2010-04-02 20:47    [W:0.033 / U:0.524 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site