HomeFreeBSD

LinuxKPI: update rcu_dereference_*() and lockdep_is_held()

Description

LinuxKPI: update rcu_dereference_*() and lockdep_is_held()

Update rcu_dereference_{check,protected}() to call the check and log
once if it fails and if the RCU debug sysctl is turned on.
Also add proper checks for conditions passed in to these functions.
For that implement linux_rcu_read_lock_held() (lots of help from wulf).

(While here also remove extraneous extern for function prototypes).

Update lockdep_is_held() to always be an inline function with argument
annotation so that we do no longer have unused variables
in callers which only call lockdep_is_held().

Sponsored by: The FreeBSD Foundation
MFC after: 3 days
Reviewed by: wulf
Differential Revision: https://reviews.freebsd.org/D46842

Details

Provenance
bzAuthored on Sep 29 2024, 12:35 AM
Reviewer
wulf
Differential Revision
D46842: LinuxKPI: update rcu_dereference_*() and lockdep_is_held()
Parents
rGd55d5dd9f7ad: style.9: clarify FALLTHROUGH
Branches
Unknown
Tags
Unknown