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


Groups > linux.kernel > #1649597

Re: [patch V3 24/32] jump_label: Reorder hotplug lock and jump_label_lock

From David Miller <davem@davemloft.net>
Newsgroups linux.kernel
Subject Re: [patch V3 24/32] jump_label: Reorder hotplug lock and jump_label_lock
Date 2017-05-24 15:00 +0200
Message-ID <tKE3o-2t8-21@gated-at.bofh.it> (permalink)
References <tKzQ6-8hN-3@gated-at.bofh.it> <tKzQ9-8hN-93@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


From: Thomas Gleixner <tglx@linutronix.de>
Date: Wed, 24 May 2017 10:15:35 +0200

> The conversion of the hotplug locking to a percpu rwsem unearthed lock
> ordering issues all over the place.
> 
> The jump_label code has two issues:
> 
>  1) Nested get_online_cpus() invocations
> 
>  2) Ordering problems vs. the cpus rwsem and the jump_label_mutex
> 
> To cure these, the following lock order has been established;
> 
>    cpus_rwsem -> jump_label_lock -> text_mutex
> 
> Even if not all architectures need protection against CPU hotplug, taking
> cpus_rwsem before jump_label_lock is now mandatory in code pathes which
> actually modify code and therefor need text_mutex protection.
> 
> Move the get_online_cpus() invocations into the core jump label code and
> establish the proper lock order where required.
> 
> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>

Acked-by: David S. Miller <davem@davemloft.net>

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


Thread

[patch V3 24/32] jump_label: Reorder hotplug lock and jump_label_lock Thomas Gleixner <tglx@linutronix.de> - 2017-05-24 10:30 +0200
  Re: [patch V3 24/32] jump_label: Reorder hotplug lock and  jump_label_lock David Miller <davem@davemloft.net> - 2017-05-24 15:00 +0200
  [tip:smp/hotplug] jump_label: Reorder hotplug lock and  jump_label_lock tip-bot for Thomas Gleixner <tipbot@zytor.com> - 2017-05-26 10:50 +0200

csiph-web