lkml.org 
[lkml]   [2014]   [Sep]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] fs: replace int param with size_t for seq_open_private()
On Mon, Sep 01, 2014 at 03:38:51PM +0100, Rob Jones wrote:
> >>kmalloc where it is expected to be a size_t.
> >
> >Which is a mistake too because allocations are never that large.
>
> Yet.

*raised eyebrow*

You do realize that kmalloc() gives physically contiguous allocation, right?
And refuses to allocate more than KMALLOC_MAX_SIZE, while we are at it.
With allocations anywhere near such range being very heavily discouraged.

There might or might not be point in using size_t for kmalloc() argument,
but "future-proofing" isn't it.


\
 
 \ /
  Last update: 2014-09-01 23:41    [W:0.097 / U:0.064 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site