• Nathan Lynch's avatar
    [PATCH] fixes for rcu_offline_cpu, rcu_move_batch · 80554084
    Nathan Lynch authored
    rcu_offline_cpu and rcu_move_batch have been broken since the list_head's
    in struct rcu_head and struct rcu_data were replaced with singly-linked
    lists:
    
      CC      kernel/rcupdate.o
    kernel/rcupdate.c: In function `rcu_move_batch':
    kernel/rcupdate.c:222: warning: passing arg 2 of `list_add_tail' from
    incompatible pointer type
    kernel/rcupdate.c: In function `rcu_offline_cpu':
    kernel/rcupdate.c:239: warning: passing arg 1 of `rcu_move_batch' from
    incompatible pointer type
    kernel/rcupdate.c:240: warning: passing arg 1 of `rcu_move_batch' from
    incompatible pointer type
    kernel/rcupdate.c:236: warning: label `unlock' defined but not used
    
    Kernel crashes when you try to offline a cpu, not surprisingly.
    
    It also looks like rcu_move_batch isn't preempt-safe so I touched that up,
    and got rid of an unused label in rcu_offline_cpu.
    Signed-off-by: default avatarNathan Lynch <nathanl@austin.ibm.com>
    Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
    80554084
rcupdate.c 10.7 KB