Re: [PATCH RESEND] genirq: Machine-parsable version of /proc/interrupts

From: Thomas Gleixner
Date: Fri Sep 09 2016 - 02:18:25 EST


On Tue, 6 Sep 2016, Craig Gallek wrote:

> On Fri, Sep 2, 2016 at 10:59 AM, Thomas Gleixner <tglx@xxxxxxxxxxxxx> wrote:
> > On Tue, 26 Jul 2016, Craig Gallek wrote:
> >> +static void irq_kobj_release(struct kobject *kobj)
> >> +{
> >> + struct irq_desc *desc = container_of(kobj, struct irq_desc, kobj);
> >> +
> >> + /*
> >> + * This irq_desc is statically allocated. Simply zero its kobject
> >> + * rather than kfree it.
> >> + */
> >> + memset(&desc->kobj, 0, sizeof(desc->kobj));
> >
> > This will nicely explode when the irq descriptor is handed out again before
> > this function is called.
> >
> > There is no point to make this work for !SPARSE_IRQ. Just ignore it.
> Thank you for the review. Just one clarification before I send v2:
> Are you suggesting getting rid of this feature entirely for the
> non-sparse version or just this kobject cleanup code?

There is no point in supporting that !SPARSE stuff. It should die anyway.

Thanks,

tglx