@@ -246,14 +246,13 @@ int kmmio_handler(struct pt_regs *regs, unsigned long addr)
246
246
page_base &= page_level_mask (l );
247
247
248
248
/*
249
- * Preemption is now disabled to prevent process switch during
250
- * single stepping. We can only handle one active kmmio trace
249
+ * Hold the RCU read lock over single stepping to avoid looking
250
+ * up the probe and kmmio_fault_page again. The rcu_read_lock_sched()
251
+ * also disables preemption and prevents process switch during
252
+ * the single stepping. We can only handle one active kmmio trace
251
253
* per cpu, so ensure that we finish it before something else
252
- * gets to run. We also hold the RCU read lock over single
253
- * stepping to avoid looking up the probe and kmmio_fault_page
254
- * again.
254
+ * gets to run.
255
255
*/
256
- preempt_disable ();
257
256
rcu_read_lock_sched_notrace ();
258
257
259
258
faultpage = get_kmmio_fault_page (page_base );
@@ -324,7 +323,6 @@ int kmmio_handler(struct pt_regs *regs, unsigned long addr)
324
323
325
324
no_kmmio :
326
325
rcu_read_unlock_sched_notrace ();
327
- preempt_enable_no_resched ();
328
326
return ret ;
329
327
}
330
328
@@ -364,7 +362,6 @@ static int post_kmmio_handler(unsigned long condition, struct pt_regs *regs)
364
362
ctx -> active -- ;
365
363
BUG_ON (ctx -> active );
366
364
rcu_read_unlock_sched_notrace ();
367
- preempt_enable_no_resched ();
368
365
369
366
/*
370
367
* if somebody else is singlestepping across a probe point, flags
0 commit comments