lkml.org 
[lkml]   [2009]   [Apr]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 4/6] xfs: use memdup_user()
Roland Dreier wrote:
> > wouldn't NULL be a better error return for this kind of interface,
> > matching kmalloc?
>
> I guess returning an error code from memdup_user() lets callers
> distinguish between ENOMEM and EFAULT. Not sure if that's important or
> not but there probably are at least some sites that care.
>

Right, and this API is simlilar to strndup_user().


\
 
 \ /
  Last update: 2009-04-09 02:47    [W:0.574 / U:0.212 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site