From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752262AbcIIGSX (ORCPT ); Fri, 9 Sep 2016 02:18:23 -0400 Received: from Galois.linutronix.de ([146.0.238.70]:46673 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751672AbcIIGSU (ORCPT ); Fri, 9 Sep 2016 02:18:20 -0400 Date: Fri, 9 Sep 2016 08:15:55 +0200 (CEST) From: Thomas Gleixner To: Craig Gallek cc: David Decotigny , LKML Subject: Re: [PATCH RESEND] genirq: Machine-parsable version of /proc/interrupts In-Reply-To: Message-ID: References: <1469543126-158620-1-git-send-email-kraigatgoog@gmail.com> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 6 Sep 2016, Craig Gallek wrote: > On Fri, Sep 2, 2016 at 10:59 AM, Thomas Gleixner 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