[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.11.1409100858470.23359@gentwo.org>
Date: Wed, 10 Sep 2014 08:59:33 -0500 (CDT)
From: Christoph Lameter <cl@...ux.com>
To: Andrew Morton <akpm@...ux-foundation.org>
cc: Jiri Kosina <jkosina@...e.cz>, Pekka Enberg <penberg@...nel.org>,
David Rientjes <rientjes@...gle.com>,
Joonsoo Kim <iamjoonsoo.kim@....com>,
linux-kernel@...r.kernel.org, linux-mm@...ck.org,
Dan Carpenter <dan.carpenter@...cle.com>,
Theodore Ts'o <tytso@....edu>
Subject: Re: [PATCH] mm/sl[aou]b: make kfree() aware of error pointers
On Tue, 9 Sep 2014, Andrew Morton wrote:
> >
> > - if (unlikely(ZERO_OR_NULL_PTR(objp)))
> > + if (unlikely(ZERO_OR_NULL_PTR(objp) || IS_ERR(objp)))
> > return;
>
> kfree() is quite a hot path to which this will add overhead. And we
> have (as far as we know) no code which will actually use this at
> present.
We could come up with a macro that does both. Basically if objp < 4086 or
so (signed comparison) then just return.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists