Skip to content

onlining cpus can break lockdep

Glauber Costa lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 5 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2turn c_idle into a pointerarch/x86/kernel/smpboot_64.c+19 -180 replies
2/2make work have a static address in do_boot_cpu()arch/x86/kernel/smpboot_64.c+7 -63 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/2] onlining cpus can break lockdep

Hi,

While testing with hotplugging cpus today, I've came across a stack trace generated by lockdep. The reason for that is that do_boot_cpu() in smpboot_64.c ends up initializing a struct work_struct variable in the stack.

These patches fix this by making it static. a per-cpu variable is choosen, since, to the best of my knowledge, nothing prevents two cpus going up at the same time, and so a single static c_idle won't do.

I separated it in two patches to better isolate the change. The first patch just paves the way, by turning access to c_idle into pointer dereferences. The second one does the real work.

Thanks