All of lore.kernel.org
 help / color / mirror / Atom feed
From: Roland Dreier <rdreier@cisco.com>
To: Christoph Hellwig <hch@infradead.org>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Li Zefan <lizf@cn.fujitsu.com>,
	LKML <linux-kernel@vger.kernel.org>,
	xfs@oss.sgi.com
Subject: Re: [PATCH 4/6] xfs: use memdup_user()
Date: Wed, 08 Apr 2009 10:31:25 -0700	[thread overview]
Message-ID: <adabpr76oia.fsf@cisco.com> (raw)
In-Reply-To: <20090408132254.GA5957@infradead.org> (Christoph Hellwig's message of "Wed, 8 Apr 2009 09:22:54 -0400")

 > 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.

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

WARNING: multiple messages have this Message-ID (diff)
From: Roland Dreier <rdreier@cisco.com>
To: Christoph Hellwig <hch@infradead.org>
Cc: Li Zefan <lizf@cn.fujitsu.com>,
	felixb@sgi.com, Andrew Morton <akpm@linux-foundation.org>,
	LKML <linux-kernel@vger.kernel.org>,
	xfs@oss.sgi.com
Subject: Re: [PATCH 4/6] xfs: use memdup_user()
Date: Wed, 08 Apr 2009 10:31:25 -0700	[thread overview]
Message-ID: <adabpr76oia.fsf@cisco.com> (raw)
In-Reply-To: <20090408132254.GA5957@infradead.org> (Christoph Hellwig's message of "Wed, 8 Apr 2009 09:22:54 -0400")

 > 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.

  reply	other threads:[~2009-04-08 17:33 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-08  7:05 [PATCH 0/6] fs: use memdup_user() Li Zefan
2009-04-08  7:06 ` [PATCH 1/6] xattr: " Li Zefan
2009-04-08  7:06 ` [PATCH 2/6] btrfs: " Li Zefan
2009-04-08  7:07 ` [PATCH 3/6] sysfs: " Li Zefan
2009-04-08  7:08 ` [PATCH 4/6] xfs: " Li Zefan
2009-04-08  7:08   ` Li Zefan
2009-04-08 13:22   ` Christoph Hellwig
2009-04-08 13:22     ` Christoph Hellwig
2009-04-08 17:31     ` Roland Dreier [this message]
2009-04-08 17:31       ` Roland Dreier
2009-04-09  0:43       ` Li Zefan
2009-04-09  0:43         ` Li Zefan
2009-04-08 20:06     ` Felix Blyakher
2009-04-08 20:06       ` Felix Blyakher
2009-04-08  7:08 ` [PATCH 5/6] ncpfs: " Li Zefan
2009-04-08  7:09 ` [PATCH 6/6] ecryptfs: " Li Zefan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=adabpr76oia.fsf@cisco.com \
    --to=rdreier@cisco.com \
    --cc=akpm@linux-foundation.org \
    --cc=hch@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lizf@cn.fujitsu.com \
    --cc=xfs@oss.sgi.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.