Explorar o código

stat: Use size_t for sizes instead of unsigned

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>
Christoph Lameter %!s(int64=13) %!d(string=hai) anos
pai
achega
9e5e8deca7
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      fs/proc/stat.c

+ 1 - 1
fs/proc/stat.c

@@ -184,7 +184,7 @@ static int show_stat(struct seq_file *p, void *v)
 
 
 static int stat_open(struct inode *inode, struct file *file)
 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;
 	char *buf;
 	struct seq_file *m;
 	struct seq_file *m;
 	int res;
 	int res;