File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -6720,11 +6720,18 @@ void __noreturn do_task_dead(void)
6720
6720
6721
6721
static inline void sched_submit_work (struct task_struct * tsk )
6722
6722
{
6723
+ static DEFINE_WAIT_OVERRIDE_MAP (sched_map , LD_WAIT_CONFIG ) ;
6723
6724
unsigned int task_flags ;
6724
6725
6725
6726
if (task_is_running (tsk ))
6726
6727
return ;
6727
6728
6729
+ /*
6730
+ * Establish LD_WAIT_CONFIG context to ensure none of the code called
6731
+ * will use a blocking primitive -- which would lead to recursion.
6732
+ */
6733
+ lock_map_acquire_try (& sched_map );
6734
+
6728
6735
task_flags = tsk -> flags ;
6729
6736
/*
6730
6737
* If a worker goes to sleep, notify and ask workqueue whether it
@@ -6749,6 +6756,8 @@ static inline void sched_submit_work(struct task_struct *tsk)
6749
6756
* make sure to submit it to avoid deadlocks.
6750
6757
*/
6751
6758
blk_flush_plug (tsk -> plug , true);
6759
+
6760
+ lock_map_release (& sched_map );
6752
6761
}
6753
6762
6754
6763
static void sched_update_worker (struct task_struct * tsk )
You can’t perform that action at this time.
0 commit comments