Re: [PATCH 1/2] Export cpu info by sysfs

From: Paul Jackson
Date: Wed Dec 14 2005 - 21:02:41 EST


Yanmin wrote:
> cpumask_scnprintf(buf, NR_CPUS+1, cpu_core_map[cpu]);

Paul wrote:
> The 2nd arg, "NR_CPUS+1", is wrong. It should be the length
> of the buffer

Yanmin replied:
> In theory, it's a problem which doesn't exist in fact.

Aha - you are right. My confusion was that I had forgotten
the format used by cpumask_scnprintf, and thought it was one
of the other formats, not a hex mask, that could overflow
NR_CPUS+1 characters of output. Please nevermind my confusion.

--
I won't rest till it's the best ...
Programmer, Linux Scalability
Paul Jackson <pj@xxxxxxx> 1.925.600.0401
-
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/