[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <0000013db1e303a2-0a69d056-fb98-4670-94fc-5c9d467fddef-000000@email.amazonses.com>
Date: Thu, 28 Mar 2013 16:44:37 +0000
From: Christoph Lameter <cl@...ux.com>
To: Eric Dumazet <eric.dumazet@...il.com>
cc: roy.qing.li@...il.com, Shan Wei <davidshan@...cent.com>,
netdev@...r.kernel.org
Subject: Re: [PATCH] core: fix the use of this_cpu_ptr
On Thu, 28 Mar 2013, Eric Dumazet wrote:
> On Thu, 2013-03-28 at 14:38 +0000, Christoph Lameter wrote:
> > On Thu, 28 Mar 2013, Eric Dumazet wrote:
>
> >
> > > Christoph, could this kind of error be detected by the compiler or
> > > sparse ?
> >
> > The per cpu variables are marked with __percpu. This should be detected by
> > sparse.
>
> make C=2 net/core/flow.o
>
> CHECK net/core/flow.c
>
> No warning.
huh?
this_cpu_ptr uses SHIFT_PERCPU_PTR
#ifndef SHIFT_PERCPU_PTR
/* Weird cast keeps both GCC and sparse happy. */
#define SHIFT_PERCPU_PTR(__p, __offset) ({ \
__verify_pcpu_ptr((__p)); \
RELOC_HIDE((typeof(*(__p)) __kernel __force *)(__p), (__offset));
\
})
#endif
This would mean that __verify_pcpu_ptr is broken.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists