Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

padata: Disable BH when taking works lock on MT path

As the old padata code can execute in softirq context, disable
softirqs for the new padata_do_mutithreaded code too as otherwise
lockdep will get antsy.

Reported-by: syzbot+0cb5bb0f4bf9e79db3b3@syzkaller.appspotmail.com
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Acked-by: Daniel Jordan <daniel.m.jordan@oracle.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>

+4 -4
+4 -4
kernel/padata.c
··· 106 106 { 107 107 int i; 108 108 109 - spin_lock(&padata_works_lock); 109 + spin_lock_bh(&padata_works_lock); 110 110 /* Start at 1 because the current task participates in the job. */ 111 111 for (i = 1; i < nworks; ++i) { 112 112 struct padata_work *pw = padata_work_alloc(); ··· 116 116 padata_work_init(pw, padata_mt_helper, data, 0); 117 117 list_add(&pw->pw_list, head); 118 118 } 119 - spin_unlock(&padata_works_lock); 119 + spin_unlock_bh(&padata_works_lock); 120 120 121 121 return i; 122 122 } ··· 134 134 if (list_empty(works)) 135 135 return; 136 136 137 - spin_lock(&padata_works_lock); 137 + spin_lock_bh(&padata_works_lock); 138 138 list_for_each_entry_safe(cur, next, works, pw_list) { 139 139 list_del(&cur->pw_list); 140 140 padata_work_free(cur); 141 141 } 142 - spin_unlock(&padata_works_lock); 142 + spin_unlock_bh(&padata_works_lock); 143 143 } 144 144 145 145 static void padata_parallel_worker(struct work_struct *parallel_work)