aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/kernel
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
parentMerge tag 'for-linus-6.15-ofs2' of git://git.kernel.org/pub/scm/linux/kernel/git/hubcap/linux (diff)
parentcrypto: algif_hash - fix double free in hash_accept (diff)
downloadwireguard-linux-5da472ae1f128840b27795fa461b47a85d882ce2.tar.xz
wireguard-linux-5da472ae1f128840b27795fa461b47a85d882ce2.zip
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')
-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);
}
}