Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S964837AbZKYOIj (ORCPT ); Wed, 25 Nov 2009 09:08:39 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S934532AbZKYOIi (ORCPT ); Wed, 25 Nov 2009 09:08:38 -0500 Received: from www.tglx.de ([62.245.132.106]:35377 "EHLO www.tglx.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933562AbZKYOIh (ORCPT ); Wed, 25 Nov 2009 09:08:37 -0500 Date: Wed, 25 Nov 2009 15:08:02 +0100 (CET) From: Thomas Gleixner To: Liuweni cc: linux-kernel , Ingo Molnar , xgr178 , strongzgy , qingshenlwy , rusty , travis , adobriyan Subject: Re: [PATCH V2]irq/core: Add a length limitation In-Reply-To: <200911252204173129580@gmail.com> Message-ID: References: <200911252204173129580@gmail.com> User-Agent: Alpine 2.00 (LFD 1167 2008-08-23) 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 Content-Length: 894 Lines: 30 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. 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/