mirror of
https://github.com/torvalds/linux.git
synced 2026-03-08 03:44:45 +01:00
kcov: 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-4-elver@google.com
This commit is contained in:
parent
d084a73714
commit
b7be9442a3
1 changed files with 1 additions and 1 deletions
|
|
@ -530,7 +530,7 @@ static int kcov_open(struct inode *inode, struct file *filep)
|
|||
kcov = kzalloc(sizeof(*kcov), GFP_KERNEL);
|
||||
if (!kcov)
|
||||
return -ENOMEM;
|
||||
spin_lock_init(&kcov->lock);
|
||||
guard(spinlock_init)(&kcov->lock);
|
||||
kcov->mode = KCOV_MODE_DISABLED;
|
||||
kcov->sequence = 1;
|
||||
refcount_set(&kcov->refcount, 1);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue