Thread (21 messages) 21 messages, 7 authors, 2013-04-11

Re: [PATCH] core: fix the use of this_cpu_ptr

From: Christoph Lameter <hidden>
Date: 2013-03-28 16:51:45

On Thu, 28 Mar 2013, Eric Dumazet wrote:
On Thu, 2013-03-28 at 14:38 +0000, Christoph Lameter wrote:
quoted
On Thu, 28 Mar 2013, Eric Dumazet wrote:
quoted
quoted
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.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help