From: Yong Zhang <yong.zhang0@gmail.com>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: Liuweni <qingshenlwy@gmail.com>,
linux-kernel <linux-kernel@vger.kernel.org>,
Ingo Molnar <mingo@elte.hu>, xgr178 <xgr178@163.com>,
strongzgy <strongzgy@gmail.com>,
qingshenlwy <qingshenlwy@tom.com>, rusty <rusty@rustcorp.com.au>,
travis <travis@sgi.com>, adobriyan <adobriyan@gmail.com>
Subject: Re: [PATCH V2]irq/core: Add a length limitation
Date: Wed, 25 Nov 2009 22:16:55 +0800 [thread overview]
Message-ID: <2674af740911250616l201e92d0j81680e7b72d3d5ea@mail.gmail.com> (raw)
In-Reply-To: <alpine.LFD.2.00.0911251503400.24119@localhost.localdomain>
On Wed, Nov 25, 2009 at 10:08 PM, Thomas Gleixner <tglx@linutronix.de> 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/
>
prev parent reply other threads:[~2009-11-25 14:16 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-25 14:04 Liuweni
2009-11-25 14:08 ` Thomas Gleixner
2009-11-25 14:16 ` Yong Zhang [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2674af740911250616l201e92d0j81680e7b72d3d5ea@mail.gmail.com \
--to=yong.zhang0@gmail.com \
--cc=adobriyan@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=qingshenlwy@gmail.com \
--cc=qingshenlwy@tom.com \
--cc=rusty@rustcorp.com.au \
--cc=strongzgy@gmail.com \
--cc=tglx@linutronix.de \
--cc=travis@sgi.com \
--cc=xgr178@163.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®