From: Andrew Morton <akpm@linux-foundation.org>
To: Christoph Lameter <cl@gentwo.org>
Cc: David Rientjes <rientjes@google.com>,
Jeff Liu <jeff.liu@oracle.com>,
"linux-mm@kvack.org" <linux-mm@kvack.org>,
Pekka Enberg <penberg@kernel.org>,
akpm@linuxfoundation.org
Subject: Re: [PATCH RESEND] slub: return correct error on slab_sysfs_init
Date: Thu, 19 Jun 2014 13:32:01 -0700 [thread overview]
Message-ID: <20140619133201.7f84ae4acbc1b9d8f65e2b4f@linux-foundation.org> (raw)
In-Reply-To: <alpine.DEB.2.11.1406190939030.2785@gentwo.org>
On Thu, 19 Jun 2014 09:39:54 -0500 (CDT) Christoph Lameter <cl@gentwo.org> wrote:
> On Wed, 18 Jun 2014, David Rientjes wrote:
>
> > Why? kset_create_and_add() can fail for a few other reasons other than
> > memory constraints and given that this is only done at bootstrap, it
> > actually seems like a duplicate name would be a bigger concern than low on
> > memory if another init call actually registered it.
>
> Greg said that the only reason for failure would be out of memory.
The kset_create_and_add interface is busted - it should return an
ERR_PTR on error, not NULL. This seems to be a common gregkh failing :(
It's plausible that out-of-memory is the most common reason for
kset_create_and_add() failure, dunno.
Jeff, the changelog wasn't a good one - it failed to describe the
reasons for the change. What was wrong with ENOSYS and why is ENOMEM
more appropriate? If Greg told us that out-of-memory is the only
possible reason for the failure then it would be useful to capture the
reasoning behind this within this changelog.
Also let's describe the effects of this patch. It looks like it's just
cosmetic - if kset_create_and_add() fails, the kernel behavior will be
the same either way.
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2014-06-19 20:32 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-18 1:29 [PATCH RESEND] slub: return correct error on slab_sysfs_init Jeff Liu
2014-06-18 20:16 ` David Rientjes
2014-06-19 14:39 ` Christoph Lameter
2014-06-19 20:32 ` Andrew Morton [this message]
2014-06-19 21:34 ` David Rientjes
2014-06-20 13:51 ` Jeff Liu
2014-06-20 22:30 ` David Rientjes
2014-06-21 8:49 ` Jeff Liu
2014-06-23 13:59 ` Christoph Lameter
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=20140619133201.7f84ae4acbc1b9d8f65e2b4f@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=akpm@linuxfoundation.org \
--cc=cl@gentwo.org \
--cc=jeff.liu@oracle.com \
--cc=linux-mm@kvack.org \
--cc=penberg@kernel.org \
--cc=rientjes@google.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).