summaryrefslogtreecommitdiff
path: root/kernel/padata.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2025-05-20 20:10:01 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2025-05-20 20:10:01 -0700
commit5da472ae1f128840b27795fa461b47a85d882ce2 (patch)
treea13ac3017b13399e4296f82d2240a93df304a154 /kernel/padata.c
parentb36ddb9210e6812eb1c86ad46b66cc46aa193487 (diff)
parentb2df03ed4052e97126267e8c13ad4204ea6ba9b6 (diff)
Merge tag 'v6.15-p7' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
Pull crypto fixes from Herbert Xu: "This fixes a regression in padata as well as an ancient double-free bug in af_alg" * tag 'v6.15-p7' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: crypto: algif_hash - fix double free in hash_accept padata: do not leak refcount in reorder_work
Diffstat (limited to 'kernel/padata.c')
-rw-r--r--kernel/padata.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/kernel/padata.c b/kernel/padata.c
index b3d4eacc4f5d..7eee94166357 100644
--- a/kernel/padata.c
+++ b/kernel/padata.c
@@ -358,7 +358,8 @@ static void padata_reorder(struct parallel_data *pd)
* To avoid UAF issue, add pd ref here, and put pd ref after reorder_work finish.
*/
padata_get_pd(pd);
- queue_work(pinst->serial_wq, &pd->reorder_work);
+ if (!queue_work(pinst->serial_wq, &pd->reorder_work))
+ padata_put_pd(pd);
}
}