lkml.org 
[lkml]   [2009]   [Nov]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    SubjectRe: [PATCH V2]irq/core: Add a length limitation
    From
    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/
    >
    --
    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/

    \
     
     \ /
      Last update: 2009-11-25 15:19    [W:0.022 / U:92.228 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site