lkml.org 
[lkml]   [2013]   [Apr]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[ 121/124] net: fix the use of this_cpu_ptr
    Date
    3.8-stable review patch.  If anyone has any objections, please let me know.

    ------------------


    From: Li RongQing <roy.qing.li@gmail.com>

    [ Upstream commit 50eab0503a7579ada512e4968738b7c9737cf36e ]

    flush_tasklet is not percpu var, and percpu is percpu var, and
    this_cpu_ptr(&info->cache->percpu->flush_tasklet)
    is not equal to
    &this_cpu_ptr(info->cache->percpu)->flush_tasklet

    1f743b076(use this_cpu_ptr per-cpu helper) introduced this bug.

    Signed-off-by: Li RongQing <roy.qing.li@gmail.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    ---
    net/core/flow.c | 2 +-
    1 file changed, 1 insertion(+), 1 deletion(-)

    --- a/net/core/flow.c
    +++ b/net/core/flow.c
    @@ -329,7 +329,7 @@ static void flow_cache_flush_per_cpu(voi
    struct flow_flush_info *info = data;
    struct tasklet_struct *tasklet;

    - tasklet = this_cpu_ptr(&info->cache->percpu->flush_tasklet);
    + tasklet = &this_cpu_ptr(info->cache->percpu)->flush_tasklet;
    tasklet->data = (unsigned long)info;
    tasklet_schedule(tasklet);
    }



    \
     
     \ /
      Last update: 2013-04-03 00:21    [W:4.242 / U:0.024 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site