Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757905AbZDIAnX (ORCPT ); Wed, 8 Apr 2009 20:43:23 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1756071AbZDIAnC (ORCPT ); Wed, 8 Apr 2009 20:43:02 -0400 Received: from cn.fujitsu.com ([222.73.24.84]:58806 "EHLO song.cn.fujitsu.com" rhost-flags-OK-FAIL-OK-OK) by vger.kernel.org with ESMTP id S1756707AbZDIAnA (ORCPT ); Wed, 8 Apr 2009 20:43:00 -0400 Message-ID: <49DD44B5.9040702@cn.fujitsu.com> Date: Thu, 09 Apr 2009 08:43:33 +0800 From: Li Zefan User-Agent: Thunderbird 2.0.0.9 (X11/20071115) MIME-Version: 1.0 To: Roland Dreier CC: Christoph Hellwig , felixb@sgi.com, Andrew Morton , LKML , xfs@oss.sgi.com Subject: Re: [PATCH 4/6] xfs: use memdup_user() References: <49DC4CC0.9050805@cn.fujitsu.com> <49DC4D54.3020001@cn.fujitsu.com> <20090408132254.GA5957@infradead.org> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 619 Lines: 15 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(). -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/