Skip to content

Commit c9b12b5

Browse files
svens-s390hcahca
authored andcommitted
s390/entry: fix duplicate tracking of irq nesting level
In the current code, when exiting from idle, rcu_irq_enter() is called twice during irq entry: irq_entry_enter()-> rcu_irq_enter() irq_enter() -> rcu_irq_enter() This may lead to wrong results from rcu_is_cpu_rrupt_from_idle() because of a wrong dynticks nmi nesting count. Fix this by only calling irq_enter_rcu(). Cc: <[email protected]> # 5.12+ Reported-by: Mark Rutland <[email protected]> Fixes: 56e62a7 ("s390: convert to generic entry") Signed-off-by: Sven Schnelle <[email protected]> Signed-off-by: Heiko Carstens <[email protected]>
1 parent 5dcf0c3 commit c9b12b5

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

arch/s390/kernel/irq.c

+5-4
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ void noinstr do_io_irq(struct pt_regs *regs)
138138
struct pt_regs *old_regs = set_irq_regs(regs);
139139
int from_idle;
140140

141-
irq_enter();
141+
irq_enter_rcu();
142142

143143
if (user_mode(regs)) {
144144
update_timer_sys();
@@ -158,7 +158,8 @@ void noinstr do_io_irq(struct pt_regs *regs)
158158
do_irq_async(regs, IO_INTERRUPT);
159159
} while (MACHINE_IS_LPAR && irq_pending(regs));
160160

161-
irq_exit();
161+
irq_exit_rcu();
162+
162163
set_irq_regs(old_regs);
163164
irqentry_exit(regs, state);
164165

@@ -172,7 +173,7 @@ void noinstr do_ext_irq(struct pt_regs *regs)
172173
struct pt_regs *old_regs = set_irq_regs(regs);
173174
int from_idle;
174175

175-
irq_enter();
176+
irq_enter_rcu();
176177

177178
if (user_mode(regs)) {
178179
update_timer_sys();
@@ -190,7 +191,7 @@ void noinstr do_ext_irq(struct pt_regs *regs)
190191

191192
do_irq_async(regs, EXT_INTERRUPT);
192193

193-
irq_exit();
194+
irq_exit_rcu();
194195
set_irq_regs(old_regs);
195196
irqentry_exit(regs, state);
196197

0 commit comments

Comments
 (0)