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.

crypto: Use scoped init guard

Convert lock initialization to scoped guarded initialization where
lock-guarded members are initialized in the same scope.

This ensures the context analysis treats the context as active during member
initialization. This is required to avoid errors once implicit context
assertion is removed.

Signed-off-by: Marco Elver <elver@google.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://patch.msgid.link/20260119094029.1344361-5-elver@google.com

authored by

Marco Elver and committed by
Peter Zijlstra
f39261f5 b7be9442

+2 -2
+1 -1
crypto/crypto_engine.c
··· 453 453 snprintf(engine->name, sizeof(engine->name), 454 454 "%s-engine", dev_name(dev)); 455 455 456 - spin_lock_init(&engine->queue_lock); 456 + guard(spinlock_init)(&engine->queue_lock); 457 457 crypto_init_queue(&engine->queue, qlen); 458 458 459 459 engine->kworker = kthread_run_worker(0, "%s", engine->name);
+1 -1
crypto/drbg.c
··· 1780 1780 if (!drbg) 1781 1781 return -ENOMEM; 1782 1782 1783 - mutex_init(&drbg->drbg_mutex); 1783 + guard(mutex_init)(&drbg->drbg_mutex); 1784 1784 drbg->core = &drbg_cores[coreref]; 1785 1785 drbg->reseed_threshold = drbg_max_requests(drbg); 1786 1786