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
Reviewed by: wulf
Differential Revision: https://reviews.freebsd.org/D46842

(cherry picked from commit 5c92f84bb607c692ce4fa762a7a3c4b86a2fa281)

Details

Provenance
bzAuthored on Sep 29 2024, 12:35 AM
Reviewer
wulf
Differential Revision
D46842: LinuxKPI: update rcu_dereference_*() and lockdep_is_held()
Parents
rG231e279ca99b: wpi.4: move hardware to HARDWARE + minor cleanup
Branches
Unknown
Tags
Unknown