lkml.org 
[lkml]   [2014]   [Jun]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/2] proc/stat: convert to single_open_size()
On Mon, 16 Jun 2014, Heiko Carstens wrote:

> Use seq_file's single_open_size() to preallocate a buffer that is large
> enough to hold the whole output, instead of open coding it.
> Also calculate the requested size using the number of online cpus instead
> of possible cpus, since the size of the output only depends on the number
> of online cpus.
>
> Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>

Acked-by: David Rientjes <rientjes@google.com>

I have no idea why the check for size > KMALLOC_MAX_SIZE was there, all
slab allocators will fallback to the page allocator and the slowpath will
return NULL.


\
 
 \ /
  Last update: 2014-06-19 02:21    [W:0.224 / U:0.192 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site