Messages in this thread | | | Date | Tue, 23 Sep 2008 08:56:37 +0400 | From | Cyrill Gorcunov <> | Subject | Re: [PATCH -tip/master] x86: io-apic - interrupt remapping fix |
| |
[Suresh Siddha - Mon, Sep 22, 2008 at 06:16:21PM -0700] | On Mon, Sep 22, 2008 at 05:57:38PM -0700, Siddha, Suresh B wrote: | > On Fri, Sep 19, 2008 at 05:33:20AM -0700, Cyrill Gorcunov wrote: | > > Interrupt remapping could lead to NULL dereference in case of | > > kzalloc failed and memory leak in other way. So fix the | > > both cases. | > > | > > Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com> | > > --- | > > | > > Ingo, the patch is on top of applied one. | > > | > > If I remember correctly Suresh was involved in | > > this - so I think he could take a look and review | > > the patch (please). | > > | > | > Acked-by: Suresh Siddha <suresh.b.siddha@intel.com> | | oops. Cyrill some typo here: | | + for (; apic > 0; apic--) | + kfree(early_ioapic_entries[apic]); | + kfree(early_ioapic_entries[apic]); |
Hi Suresh, thanks for review!
Well it's not typo actually :) Of course it could be like
for (--apic; apic > 0; apic--) or for (apic--; apic > 0; apic--)
but it will be a rpoblem in case if apic = 0 and if someday apic would be unsigned int. So I prefered to have _one_ kfree(NULL) call instead :)
I hope i didn't miss anything.
- Cyrill -
| |