Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S964796AbZKYOQu (ORCPT ); Wed, 25 Nov 2009 09:16:50 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1758468AbZKYOQt (ORCPT ); Wed, 25 Nov 2009 09:16:49 -0500 Received: from mail-px0-f180.google.com ([209.85.216.180]:51643 "EHLO mail-px0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753333AbZKYOQt convert rfc822-to-8bit (ORCPT ); Wed, 25 Nov 2009 09:16:49 -0500 DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=Kt/hcvffEgdb6A2YR6bne4fWVk8jmOEdlCZ+NL38tu6tatOIU7PC6cVSfpxONU7KB1 qTHQidiKXsICy8ebrHpqWLc/BvtatZnKPAtAcOpf4CmX8RrhECvXfcptssrEIal7KAZ/ uKno5SRfpJcNlHARPaCouBaRXPmtucED/bUDM= MIME-Version: 1.0 In-Reply-To: References: <200911252204173129580@gmail.com> Date: Wed, 25 Nov 2009 22:16:55 +0800 Message-ID: <2674af740911250616l201e92d0j81680e7b72d3d5ea@mail.gmail.com> Subject: Re: [PATCH V2]irq/core: Add a length limitation From: Yong Zhang To: Thomas Gleixner Cc: Liuweni , linux-kernel , Ingo Molnar , xgr178 , strongzgy , qingshenlwy , rusty , travis , adobriyan Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1502 Lines: 46 On Wed, Nov 25, 2009 at 10:08 PM, Thomas Gleixner wrote: > On Wed, 25 Nov 2009, Liuweni wrote: > >>  --- >> In this version, I modify the code by Ingo's suggestion, >> and less code add. >> The code will check the irqaction->name's length >> and avoid Using too long name without any notice. >> >> --- a/kernel/irq/proc.c >> +++ b/kernel/irq/proc.c >> @@ -196,6 +196,8 @@ void register_handler_proc(unsigned int irq, struct irqaction *action) >>       char name [MAX_NAMELEN]; >>       struct irq_desc *desc = irq_to_desc(irq); >> >> +     WARN_ON(strlen(action->name) < MAX_NAMELEN); >> + > > This is going to warn on every action->name which is actually used in > the kernel except for the ones which are too long. > Even we add WARN_ON(strlen(action->name) > MAX_NAMELEN), I think it doesn't affect the runtime things, what it could tell is that there maybe two different irqs with the same name showed under /proc Thanks, Yong > Thanks, > >        tglx > > > -- > To unsubscribe from this list: send the line "unsubscribe linux-kernel" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at  http://vger.kernel.org/majordomo-info.html > Please read the FAQ at  http://www.tux.org/lkml/ > -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/