New issue
Advanced search Search tips

Issue 908722 link

Starred by 1 user

Issue metadata

Status: Untriaged
Owner: ----
Cc:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

kgdb: should try to inhibit hotplug when entering kgdb

Project Member Reported by dianders@google.com, Nov 27

Issue description

If we are in the middle of hotplugging a cpu at the same time we try to enter kgdb then things won't be so happy.

In <https://lkml.kernel.org/r/20181114220744.GB4044@brain-police> Will pointed out that kgdb_roundup_cpus() might not be so happy since it iterates over all online CPUs.  

Presumably this bit of code will also be problematic:

  while (kgdb_do_roundup && --time_left &&
         (atomic_read(&masters_in_kgdb) + atomic_read(&slaves_in_kgdb)) !=
     online_cpus)
  udelay(1000);


It might be a bit hard to totally inhibit things because I think we'd have to interact with the mutex "cpu_add_remove_lock", but when we enter kgdb we might be at interrupt time and so interacting with mutexes isn't totally trivial.



We should try to figure something out here.  Maybe we can have some sort of delay waiting for someone else to release the mutex?  Something with mutex_trylock()?
 

Sign in to add a comment