|
@@ -138,9 +138,9 @@ static int stat_open(struct inode *inode, struct file *file)
|
|
struct seq_file *m;
|
|
struct seq_file *m;
|
|
int res;
|
|
int res;
|
|
|
|
|
|
- /* don't ask for more than the kmalloc() max size, currently 128 KB */
|
|
|
|
- if (size > 128 * 1024)
|
|
|
|
- size = 128 * 1024;
|
|
|
|
|
|
+ /* don't ask for more than the kmalloc() max size */
|
|
|
|
+ if (size > KMALLOC_MAX_SIZE)
|
|
|
|
+ size = KMALLOC_MAX_SIZE;
|
|
buf = kmalloc(size, GFP_KERNEL);
|
|
buf = kmalloc(size, GFP_KERNEL);
|
|
if (!buf)
|
|
if (!buf)
|
|
return -ENOMEM;
|
|
return -ENOMEM;
|