[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.00.1201301134090.28693@router.home>
Date: Mon, 30 Jan 2012 11:35:29 -0600 (CST)
From: Christoph Lameter <cl@...ux.com>
To: Tejun Heo <tj@...nel.org>
cc: Dmitry Antipov <dmitry.antipov@...aro.org>,
Rusty Russell <rusty@...tcorp.com.au>, linux-mm@...ck.org,
linux-kernel@...r.kernel.org, patches@...aro.org,
linaro-dev@...ts.linaro.org
Subject: Re: [PATCH 1/3] percpu: use ZERO_SIZE_PTR / ZERO_OR_NULL_PTR
On Mon, 30 Jan 2012, Tejun Heo wrote:
> I'm pretty sure it never gives out NULL for a dynamic allocation. The
> base might be mapped to zero but we're guaranteed to have some static
> percpu areas there and IIRC the percpu addresses aren't supposed to
> wrap.
True but there is a check for a NULL pointer on free. So a NULL pointer
currently has the semantics of being an unallocated per cpu structure.
If the allocator returns NULL by accident then we cannot free the per cpu
allocation anymore.
--
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