diff options
author | 2025-04-25 23:11:31 -0700 | |
---|---|---|
committer | 2025-04-28 19:45:26 +0800 | |
commit | db4978d2f0559288a1595f82bda419fad216beed (patch) | |
tree | 4a62867f0fea65d64d1a1cf43da9b6423bfc2d59 /drivers/crypto | |
parent | crypto: sun8i-ce-cipher - use pm_runtime_resume_and_get() (diff) | |
download | linux-rng-db4978d2f0559288a1595f82bda419fad216beed.tar.xz linux-rng-db4978d2f0559288a1595f82bda419fad216beed.zip |
crypto: iaa - Adjust workqueue allocation type
In preparation for making the kmalloc family of allocators type aware,
we need to make sure that the returned type from the allocation matches
the type of the variable being assigned. (Before, the allocator would
always return "void *", which can be implicitly cast to any pointer type.)
The assigned type is "struct idxd_wq **", but the returned type will be
"struct wq **". These are the same size allocation (pointer sized), but
the types don't match. Adjust the allocation type to match the assignment.
Signed-off-by: Kees Cook <kees@kernel.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/crypto')
-rw-r--r-- | drivers/crypto/intel/iaa/iaa_crypto_main.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/crypto/intel/iaa/iaa_crypto_main.c b/drivers/crypto/intel/iaa/iaa_crypto_main.c index be3b899c6977..e9c762124f11 100644 --- a/drivers/crypto/intel/iaa/iaa_crypto_main.c +++ b/drivers/crypto/intel/iaa/iaa_crypto_main.c @@ -725,7 +725,7 @@ static int alloc_wq_table(int max_wqs) for (cpu = 0; cpu < nr_cpus; cpu++) { entry = per_cpu_ptr(wq_table, cpu); - entry->wqs = kcalloc(max_wqs, sizeof(struct wq *), GFP_KERNEL); + entry->wqs = kcalloc(max_wqs, sizeof(*entry->wqs), GFP_KERNEL); if (!entry->wqs) { free_wq_table(); return -ENOMEM; |