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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 <[email protected]> 1.925.600.0401
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux