On Mon, 30 Jan 2012 10:16:39 -0800, Tejun Heo t...@kernel.org wrote:
On Mon, Jan 30, 2012 at 12:12:18PM -0600, Christoph Lameter wrote:
I thought it didn't. I rememer thinking about this and determining
that NULL can't be allocated for dynamic addresses. Maybe I'm
imagining things.
On Mon, Jan 30, 2012 at 11:22:57AM -0600, Christoph Lameter wrote:
On Mon, 30 Jan 2012, Tejun Heo wrote:
On Mon, Jan 30, 2012 at 09:15:58AM -0800, Tejun Heo wrote:
Percpu pointers are in a different address space and using
ZERO_SIZE_PTR directly will trigger sparse address space
On Mon, Jan 30, 2012 at 10:02:24AM -0800, Tejun Heo wrote:
I thought it didn't. I rememer thinking about this and determining
that NULL can't be allocated for dynamic addresses. Maybe I'm
imagining things. Anyways, if it can return NULL for valid
allocation, it is a bug and should be fixed.
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
On Mon, Jan 30, 2012 at 09:15:58AM -0800, Tejun Heo wrote:
Percpu pointers are in a different address space and using
ZERO_SIZE_PTR directly will trigger sparse address space warning.
Also, I'm not entirely sure whether 16 is guaranteed to be unused in
percpu address space (maybe it is but I
On Mon, 30 Jan 2012, Tejun Heo wrote:
Hello, Christoph.
On Mon, Jan 30, 2012 at 11:52:23AM -0600, Christoph Lameter wrote:
We have two possibilities now:
1. We say that the value returned from the per cpu allocator is an opaque
value.
This means that we have to remove the NULL
On Mon, 30 Jan 2012, Tejun Heo wrote:
Hello,
On Mon, Jan 30, 2012 at 11:58:52AM -0600, Christoph Lameter wrote:
No, NULL is never gonna be a valid return from any allocator including
percpu. Percpu allocator doesn't and will never do so.
How do you prevent the percpu allocator from
On Mon, 30 Jan 2012, Tejun Heo wrote:
On Mon, Jan 30, 2012 at 09:15:58AM -0800, Tejun Heo wrote:
Percpu pointers are in a different address space and using
ZERO_SIZE_PTR directly will trigger sparse address space warning.
Also, I'm not entirely sure whether 16 is guaranteed to be unused in
On Mon, 30 Jan 2012, Tejun Heo wrote:
Percpu pointers are in a different address space and using
ZERO_SIZE_PTR directly will trigger sparse address space warning.
Also, I'm not entirely sure whether 16 is guaranteed to be unused in
percpu address space (maybe it is but I don't think we have
On Mon, Jan 30, 2012 at 12:37:34PM +0400, Dmitry Antipov wrote:
Fix pcpu_alloc() to return ZERO_SIZE_PTR if requested size is 0;
fix free_percpu() to check passed pointer with ZERO_OR_NULL_PTR.
Signed-off-by: Dmitry Antipov dmitry.anti...@linaro.org
---
mm/percpu.c | 16 +++-
Hello, Christoph.
On Mon, Jan 30, 2012 at 11:52:23AM -0600, Christoph Lameter wrote:
We have two possibilities now:
1. We say that the value returned from the per cpu allocator is an opaque
value.
This means that we have to remove the NULL check from the free
function. And
On Mon, 30 Jan 2012, Tejun Heo wrote:
Anyways, yeah, it seems we should improve this part too.
I agree.
___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev
Hello,
On Mon, Jan 30, 2012 at 11:58:52AM -0600, Christoph Lameter wrote:
No, NULL is never gonna be a valid return from any allocator including
percpu. Percpu allocator doesn't and will never do so.
How do you prevent the percpu allocator from returning NULL? I thought the
per cpu
On Mon, 30 Jan 2012, Tejun Heo wrote:
On Mon, Jan 30, 2012 at 11:22:14AM -0600, Christoph Lameter wrote:
On Mon, 30 Jan 2012, Tejun Heo wrote:
Percpu pointers are in a different address space and using
ZERO_SIZE_PTR directly will trigger sparse address space warning.
Also, I'm not
On Mon, Jan 30, 2012 at 11:22:14AM -0600, Christoph Lameter wrote:
On Mon, 30 Jan 2012, Tejun Heo wrote:
Percpu pointers are in a different address space and using
ZERO_SIZE_PTR directly will trigger sparse address space warning.
Also, I'm not entirely sure whether 16 is guaranteed to be
On Mon, Jan 30, 2012 at 12:12:18PM -0600, Christoph Lameter wrote:
I thought it didn't. I rememer thinking about this and determining
that NULL can't be allocated for dynamic addresses. Maybe I'm
imagining things. Anyways, if it can return NULL for valid
allocation, it is a bug and
Fix pcpu_alloc() to return ZERO_SIZE_PTR if requested size is 0;
fix free_percpu() to check passed pointer with ZERO_OR_NULL_PTR.
Signed-off-by: Dmitry Antipov dmitry.anti...@linaro.org
---
mm/percpu.c | 16 +++-
1 files changed, 11 insertions(+), 5 deletions(-)
diff --git
On Mon, 30 Jan 2012, Dmitry Antipov wrote:
Fix pcpu_alloc() to return ZERO_SIZE_PTR if requested size is 0;
fix free_percpu() to check passed pointer with ZERO_OR_NULL_PTR.
Acked-by: Christoph Lameter c...@linux.com
___
linaro-dev mailing list
18 matches
Mail list logo