rcu: prevent RCU_LOCKDEP_WARN() from swallowing the condition
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest7 patches 3 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/7 | sched: un-hide lockdep_tasklist_lock_is_held() for !LOCKDEPinclude/ | +0 | 0 replies | |
| 2/7 | rcu: un-hide lockdep maps for !LOCKDEPinclude/ include/ | +7 | 0 replies | |
| 3/7 | net: un-hide lockdep_sock_is_held() for !LOCKDEPinclude/ | +0 | 0 replies | |
| 4/7 | net: sched: remove broken definitions and un-hide for !LOCKDEPinclude/ | +0 | 0 replies | |
| 5/7 | srcu: use a more appropriate lockdep helperkernel/ | +1 | 0 replies | |
| 6/7 | lockdep: provide dummy forward declaration of *_is_held() helpersinclude/ | +6 | 1 reply | |
| 7/7 | rcu: prevent RCU_LOCKDEP_WARN() from swallowing the conditioninclude/ | +1 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH net-next 0/7] rcu: prevent RCU_LOCKDEP_WARN() from swallowing the condition
Hi!
So I unfolded the RFC patch into smaller chunks and fixed an issue in SRCU pointed out by build bot. Build bot has been quiet for a day but I'm not 100% sure it's scanning my tree, so let's give these patches some ML exposure.
The motivation here is that we run into a unused variable warning in networking code because RCU_LOCKDEP_WARN() makes its argument disappear with !LOCKDEP / !PROVE_RCU. We marked the variable as __maybe_unused, but that's ugly IMHO.
This set makes the relevant function declarations visible to the compiler and uses (0 && (condition)) to make the compiler remove those calls before linker realizes they are never defined.
I'm tentatively marking these for net-next, but if anyone (Paul?) wants to take them into their tree - even better.
Jakub Kicinski (7):
sched: un-hide lockdep_tasklist_lock_is_held() for !LOCKDEP
rcu: un-hide lockdep maps for !LOCKDEP
net: un-hide lockdep_sock_is_held() for !LOCKDEP
net: sched: remove broken definitions and un-hide for !LOCKDEP
srcu: use a more appropriate lockdep helper
lockdep: provide dummy forward declaration of *_is_held() helpers
rcu: prevent RCU_LOCKDEP_WARN() from swallowing the condition
include/linux/lockdep.h | 6 ++++++ include/linux/rcupdate.h | 11 ++++++----- include/linux/rcupdate_trace.h | 4 ++-- include/linux/sched/task.h | 2 -- include/net/sch_generic.h | 12 ------------ include/net/sock.h | 2 -- kernel/rcu/srcutree.c | 2 +- 7 files changed, 15 insertions(+), 24 deletions(-)
Signature · 1 line
2.26.2