Skip to content

Commit 6be5f58

Browse files
committed
Merge tag 'locking-urgent-2020-12-27' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull locking fixes from Ingo Molnar: "Misc fixes/updates: - Fix static keys usage in module __init sections - Add separate MAINTAINERS entry for static branches/calls - Fix lockdep splat with CONFIG_PREEMPTIRQ_EVENTS=y tracing" * tag 'locking-urgent-2020-12-27' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: softirq: Avoid bad tracing / lockdep interaction jump_label/static_call: Add MAINTAINERS jump_label: Fix usage in module __init
2 parents 2eeefc6 + 91ea62d commit 6be5f58

File tree

3 files changed

+22
-4
lines changed

3 files changed

+22
-4
lines changed

MAINTAINERS

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16917,6 +16917,22 @@ M: Ion Badulescu <[email protected]>
1691716917
S: Odd Fixes
1691816918
F: drivers/net/ethernet/adaptec/starfire*
1691916919

16920+
STATIC BRANCH/CALL
16921+
M: Peter Zijlstra <[email protected]>
16922+
M: Josh Poimboeuf <[email protected]>
16923+
M: Jason Baron <[email protected]>
16924+
R: Steven Rostedt <[email protected]>
16925+
R: Ard Biesheuvel <[email protected]>
16926+
S: Supported
16927+
F: arch/*/include/asm/jump_label*.h
16928+
F: arch/*/include/asm/static_call*.h
16929+
F: arch/*/kernel/jump_label.c
16930+
F: arch/*/kernel/static_call.c
16931+
F: include/linux/jump_label*.h
16932+
F: include/linux/static_call*.h
16933+
F: kernel/jump_label.c
16934+
F: kernel/static_call.c
16935+
1692016936
STEC S1220 SKD DRIVER
1692116937
M: Damien Le Moal <[email protected]>
1692216938

kernel/jump_label.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -793,6 +793,7 @@ int jump_label_text_reserved(void *start, void *end)
793793
static void jump_label_update(struct static_key *key)
794794
{
795795
struct jump_entry *stop = __stop___jump_table;
796+
bool init = system_state < SYSTEM_RUNNING;
796797
struct jump_entry *entry;
797798
#ifdef CONFIG_MODULES
798799
struct module *mod;
@@ -804,15 +805,16 @@ static void jump_label_update(struct static_key *key)
804805

805806
preempt_disable();
806807
mod = __module_address((unsigned long)key);
807-
if (mod)
808+
if (mod) {
808809
stop = mod->jump_entries + mod->num_jump_entries;
810+
init = mod->state == MODULE_STATE_COMING;
811+
}
809812
preempt_enable();
810813
#endif
811814
entry = static_key_entries(key);
812815
/* if there are no users, entry can be NULL */
813816
if (entry)
814-
__jump_label_update(key, entry, stop,
815-
system_state < SYSTEM_RUNNING);
817+
__jump_label_update(key, entry, stop, init);
816818
}
817819

818820
#ifdef CONFIG_STATIC_KEYS_SELFTEST

kernel/softirq.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ void __local_bh_enable_ip(unsigned long ip, unsigned int cnt)
186186
* Keep preemption disabled until we are done with
187187
* softirq processing:
188188
*/
189-
preempt_count_sub(cnt - 1);
189+
__preempt_count_sub(cnt - 1);
190190

191191
if (unlikely(!in_interrupt() && local_softirq_pending())) {
192192
/*

0 commit comments

Comments
 (0)