Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1639381

Re: [PATCHv3 0/2] arm64: fix hotplug rwsem boot fallout

From Mark Rutland <mark.rutland@arm.com>
Newsgroups linux.kernel
Subject Re: [PATCHv3 0/2] arm64: fix hotplug rwsem boot fallout
Date 2017-05-11 15:00 +0200
Message-ID <tFVRg-6p2-21@gated-at.bofh.it> (permalink)
References (1 earlier) <tFEnn-43w-9@gated-at.bofh.it> <tFG5Q-58x-5@gated-at.bofh.it> <tFRNE-40O-21@gated-at.bofh.it> <tFSJH-4zj-5@gated-at.bofh.it> <tFTcK-4Yv-31@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Thu, May 11, 2017 at 12:01:21PM +0200, Thomas Gleixner wrote:
> On Thu, 11 May 2017, Mark Rutland wrote:
> > On Thu, May 11, 2017 at 10:30:39AM +0200, Thomas Gleixner wrote:
> > > On Wed, 10 May 2017, Thomas Gleixner wrote:
> > > secondary_start_kernel()
> > >   check_local_cpu_capabilities()
> > >     update_cpu_errata_workarounds()
> > >       update_cpu_capabilities()
> > >         static_key_enable()
> > > 	  __static_key_slow_inc()
> > > 	    jump_label_lock()
> > >        	      mutex_lock(&jump_label_mutex);
> > > 
> > > How is that supposed to work?
> > > 
> > > That call path is the low level CPU bringup, running in the context of the
> > > idle task of that CPU with interrupts and preemption disabled. Taking a
> > > mutex in that context, even if in that case the mutex is uncontended, is a
> > > NONO.

> > As an aside, do we have anything that should detect the broken mutex
> > usage? I've been testing kernels with LOCKDEP, PROVE_LOCKING,
> > DEBUG_ATOMIC_SLEEP, and friends, and nothing has complained so far.
> 
> Peter and myself were wondering about that already. No idea why that
> doesn't yell at you.

AFAICT, this happens early enough that system_state is SYSTEM_BOOTING.
In ___might_sleep(), we see this and bail out without a splat.

Thanks,
Mark.

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCHv3 0/2] arm64: fix hotplug rwsem boot fallout Mark Rutland <mark.rutland@arm.com> - 2017-04-28 13:10 +0200
  [PATCHv3 2/2] arm64: cpufeature: use static_branch_enable_cpuslocked() Mark Rutland <mark.rutland@arm.com> - 2017-04-28 13:10 +0200
    [tip:smp/hotplug] arm64/cpufeature: Use  static_branch_enable_cpuslocked() tip-bot for Mark Rutland <tipbot@zytor.com> - 2017-04-30 11:50 +0200
  [PATCHv3 1/2] jump_label: Provide static_key_[enable|/slow_inc]_cpuslocked() Mark Rutland <mark.rutland@arm.com> - 2017-04-28 13:10 +0200
    [tip:smp/hotplug] jump_label: Provide  static_key_[enable|/slow_inc]_cpuslocked() tip-bot for Sebastian Andrzej Siewior <tipbot@zytor.com> - 2017-04-30 11:50 +0200
  Re: [PATCHv3 0/2] arm64: fix hotplug rwsem boot fallout Mark Rutland <mark.rutland@arm.com> - 2017-05-10 20:20 +0200
    Re: [PATCHv3 0/2] arm64: fix hotplug rwsem boot fallout Thomas Gleixner <tglx@linutronix.de> - 2017-05-10 22:10 +0200
      Re: [PATCHv3 0/2] arm64: fix hotplug rwsem boot fallout Thomas Gleixner <tglx@linutronix.de> - 2017-05-11 10:40 +0200
        Re: [PATCHv3 0/2] arm64: fix hotplug rwsem boot fallout Mark Rutland <mark.rutland@arm.com> - 2017-05-11 11:40 +0200
          Re: [PATCHv3 0/2] arm64: fix hotplug rwsem boot fallout Thomas Gleixner <tglx@linutronix.de> - 2017-05-11 12:10 +0200
            Re: [PATCHv3 0/2] arm64: fix hotplug rwsem boot fallout Mark Rutland <mark.rutland@arm.com> - 2017-05-11 15:00 +0200

csiph-web