Skip to content

Commit

Permalink
stat: Use size_t for sizes instead of unsigned
Browse files Browse the repository at this point in the history
On some platforms (such as IA64) the large page size may results in
slab allocations to be allowed of numbers that do not fit in 32 bit.

Acked-by: Glauber Costa <glommer@parallels.com>
Signed-off-by: Christoph Lameter <cl@linux.com>
Signed-off-by: Pekka Enberg <penberg@kernel.org>
  • Loading branch information
Christoph Lameter authored and Pekka Enberg committed Feb 1, 2013
1 parent f97d5f6 commit 9e5e8de
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/proc/stat.c
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ static int show_stat(struct seq_file *p, void *v)

static int stat_open(struct inode *inode, struct file *file)
{
unsigned size = 1024 + 128 * num_possible_cpus();
size_t size = 1024 + 128 * num_possible_cpus();
char *buf;
struct seq_file *m;
int res;
Expand Down

0 comments on commit 9e5e8de

Please sign in to comment.