xfs
[Top] [All Lists]

Re: [PATCH 4/6] xfs: use memdup_user()

To: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Subject: Re: [PATCH 4/6] xfs: use memdup_user()
From: Roland Dreier <rdreier@xxxxxxxxx>
Date: Wed, 08 Apr 2009 10:31:25 -0700
Authentication-results: syd-dkim-1; header.From=rdreier@xxxxxxxxx; dkim=pass ( sig from cisco.com/syddkim1002 verified; );
Cc: Li Zefan <lizf@xxxxxxxxxxxxxx>, felixb@xxxxxxx, Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>, LKML <linux-kernel@xxxxxxxxxxxxxxx>, xfs@xxxxxxxxxxx
Dkim-signature: v=1; a=rsa-sha256; q=dns/txt; l=301; t=1239211886; x=1240075886; c=relaxed/simple; s=syddkim1002; h=Content-Type:From:Subject:Content-Transfer-Encoding:MIME-Version; d=cisco.com; i=rdreier@xxxxxxxxx; z=From:=20Roland=20Dreier=20<rdreier@xxxxxxxxx> |Subject:=20Re=3A=20[PATCH=204/6]=20xfs=3A=20use=20memdup_u ser() |Sender:=20; bh=D9O1kDG8ifNkpuUOdMD/LKAg7MKrXL3IQfI1o3uCciI=; b=wV4bTr0y1fTAUlhuM1UM0U1erQTGUUV/7CgPQrRnF+c/avWBHSKTD4scA+ OrpIiZE3yei0lt2fSxwi/NYuh027pWxv+q/qsZWqne1CGbsAh6y7oMGhaDsK 6LtkD55uAcKWTJlfKHATyQUzoNkphUbZJxAvxixh0CS/4ece9/gag=;
In-reply-to: <20090408132254.GA5957@xxxxxxxxxxxxx> (Christoph Hellwig's message of "Wed, 8 Apr 2009 09:22:54 -0400")
References: <49DC4CC0.9050805@xxxxxxxxxxxxxx> <49DC4D54.3020001@xxxxxxxxxxxxxx> <20090408132254.GA5957@xxxxxxxxxxxxx>
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux)
 > 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.

 - R.

<Prev in Thread] Current Thread [Next in Thread>