File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -5516,6 +5516,8 @@ static int init_rescuer(struct workqueue_struct *wq)
5516
5516
struct worker * rescuer ;
5517
5517
int ret ;
5518
5518
5519
+ lockdep_assert_held (& wq_pool_mutex );
5520
+
5519
5521
if (!(wq -> flags & WQ_MEM_RECLAIM ))
5520
5522
return 0 ;
5521
5523
@@ -5538,7 +5540,7 @@ static int init_rescuer(struct workqueue_struct *wq)
5538
5540
5539
5541
wq -> rescuer = rescuer ;
5540
5542
if (wq -> flags & WQ_UNBOUND )
5541
- kthread_bind_mask (rescuer -> task , wq_unbound_cpumask );
5543
+ kthread_bind_mask (rescuer -> task , unbound_effective_cpumask ( wq ) );
5542
5544
else
5543
5545
kthread_bind_mask (rescuer -> task , cpu_possible_mask );
5544
5546
wake_up_process (rescuer -> task );
@@ -5702,10 +5704,10 @@ struct workqueue_struct *alloc_workqueue(const char *fmt,
5702
5704
5703
5705
list_add_tail_rcu (& wq -> list , & workqueues );
5704
5706
5705
- apply_wqattrs_unlock ();
5706
-
5707
5707
if (wq_online && init_rescuer (wq ) < 0 )
5708
- goto err_destroy ;
5708
+ goto err_unlock_destroy ;
5709
+
5710
+ apply_wqattrs_unlock ();
5709
5711
5710
5712
if ((wq -> flags & WQ_SYSFS ) && workqueue_sysfs_register (wq ))
5711
5713
goto err_destroy ;
@@ -5730,6 +5732,8 @@ struct workqueue_struct *alloc_workqueue(const char *fmt,
5730
5732
free_workqueue_attrs (wq -> unbound_attrs );
5731
5733
kfree (wq );
5732
5734
return NULL ;
5735
+ err_unlock_destroy :
5736
+ apply_wqattrs_unlock ();
5733
5737
err_destroy :
5734
5738
destroy_workqueue (wq );
5735
5739
return NULL ;
You can’t perform that action at this time.
0 commit comments