lockdep_asse...read_lock_bh(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

🌸 lockdep_asse...read_lock_bh β€” the Kernel API Manual, bestie edition 🌸

okay so this one lives in the Kernel API Manual and honestly the vibe is: "did you actually hold the lock or are you lying to me?" πŸ’…


✨ NAME ✨

lockdep_assert_in_rcu_read_lock_bh β€” literally goes WARN if you're not protected by rcu_read_lock_bh(). that's it. that's the whole job 🫢


πŸ¦‹ SYNOPSIS πŸ¦‹

lockdep_assert_in_rcu_read_lock_bh

no args, no options, no drama. she's a function and she shows up exactly like that πŸ‘‘


πŸ’– DESCRIPTION πŸ’–

So here's the tea β˜• β€” this thing splats if lockdep is enabled and there is no rcu_read_lock_bh in effect. Like, full-on screaming into the kernel log. not subtle. not cute. but necessary, ngl 😭

And here's the part people get wrong every single time, so pay attention bestie πŸ‘€: local_bh_disable and friends do not suffice here. nope. not even a little. an actual rcu_read_lock_bh is required.

so if you're sitting there like "but I disabled bh tho??" β€” ma'am. that is not the same thing. the check wants the real one. periodt πŸ’€

πŸ‘‘ SEE ALSO πŸ‘‘

the whole extended friend group, in the order they were introduced πŸŽ€

also shoutout to where she actually lives: the kernel file ./include/linux/rcupdate.h β€” that's her address, don't lose it 🏑


and that's the whole page, bestie ✨ this icon was brought to you by the good people at ./include/linux, dated October 2026, and filed under lockdep_asse...read_lock_bh(9) in the Kernel API Manual. slay, stay locked, and please use the actual rcu_read_lock_bh πŸ’œπŸŽ€

πŸ“¦ where this page comes from