Re: [PATCH 2.6.22-rc6-mm1] kallsyms: make KSYM_NAME_LEN include spacefor trailing '\0'

From: Paulo Marques
Date: Wed Jul 11 2007 - 06:59:16 EST


Tejun Heo wrote:
KSYM_NAME_LEN is peculiar in that it does not include the space for
the trailing '\0', forcing all users to use KSYM_NAME_LEN + 1 when
allocating buffer. This is nonsense and error-prone. Moreover, when
the caller forgets that it's very likely to subtly bite back by
corrupting the stack because the last position of the buffer is always
cleared to zero.

This patch increments KSYM_NAME_LEN by one and updates code
accordingly.

Nice work.

I've been wanting to do that cleanup myself for a long time ;)

Acked-by: Paulo Marques <pmarques@xxxxxxxxxxxx>

--
Paulo Marques - www.grupopie.com

"You're just jealous because the voices only talk to me."
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/