lkml.org 
[lkml]   [2013]   [Oct]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] kernel/irq/proc.c: set MAX_NAMELEN 11 instead of 10 which express the maximize size of "%d" or "%u".
Hello Al Viro:

Is this patch correct? ;-)

Thanks.

On 10/05/2013 11:19 PM, Chen Gang wrote:
> Theoretically, the maximize size of "%d" or "%u" is 11 (10 + '\0'), so
> need set MAX_NAMELEN 11 instead of 10.
>
> In real world, it may not cause issue, but still recommend to fix this
> 'theoretical' bug (especially original definition already considered
> about 'theoretical' using).
>
> Signed-off-by: Chen Gang <gang.chen@asianux.com>
> ---
> kernel/irq/proc.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/kernel/irq/proc.c b/kernel/irq/proc.c
> index 36f6ee1..4e9a9ee 100644
> --- a/kernel/irq/proc.c
> +++ b/kernel/irq/proc.c
> @@ -305,7 +305,7 @@ void register_handler_proc(unsigned int irq, struct irqaction *action)
>
> #undef MAX_NAMELEN
>
> -#define MAX_NAMELEN 10
> +#define MAX_NAMELEN 11
>
> void register_irq_proc(unsigned int irq, struct irq_desc *desc)
> {
>


--
Chen Gang


\
 
 \ /
  Last update: 2013-10-05 17:41    [W:0.084 / U:2.248 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site