€•I^Œsphinx.addnodes”Œdocument”“”)”}”(Œ rawsource”Œ”Œchildren”]”(Œ translations”Œ LanguagesNode”“”)”}”(hhh]”(hŒ pending_xref”“”)”}”(hhh]”Œdocutils.nodes”ŒText”“”ŒChinese (Simplified)”…””}”Œparent”hsbaŒ attributes”}”(Œids”]”Œclasses”]”Œnames”]”Œdupnames”]”Œbackrefs”]”Œ refdomain”Œstd”Œreftype”Œdoc”Œ reftarget”Œ/translations/zh_CN/RCU/lockdep”Œmodname”NŒ classname”NŒ refexplicit”ˆuŒtagname”hhh ubh)”}”(hhh]”hŒChinese (Traditional)”…””}”hh2sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ/translations/zh_TW/RCU/lockdep”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒItalian”…””}”hhFsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ/translations/it_IT/RCU/lockdep”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒJapanese”…””}”hhZsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ/translations/ja_JP/RCU/lockdep”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒKorean”…””}”hhnsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ/translations/ko_KR/RCU/lockdep”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒPortuguese (Brazilian)”…””}”hh‚sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ/translations/pt_BR/RCU/lockdep”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒSpanish”…””}”hh–sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ/translations/sp_SP/RCU/lockdep”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubeh}”(h]”h ]”h"]”h$]”h&]”Œcurrent_language”ŒEnglish”uh1h hhŒ _document”hŒsource”NŒline”NubhŒcomment”“”)”}”(hŒ SPDX-License-Identifier: GPL-2.0”h]”hŒ SPDX-License-Identifier: GPL-2.0”…””}”hh·sbah}”(h]”h ]”h"]”h$]”h&]”Œ xml:space”Œpreserve”uh1hµhhh²hh³Œ9/var/lib/git/docbuild/linux/Documentation/RCU/lockdep.rst”h´KubhŒsection”“”)”}”(hhh]”(hŒtitle”“”)”}”(hŒRCU and lockdep checking”h]”hŒRCU and lockdep checking”…””}”(hhÏh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhhÊh²hh³hÇh´KubhŒ paragraph”“”)”}”(hXzAll flavors of RCU have lockdep checking available, so that lockdep is aware of when each task enters and leaves any flavor of RCU read-side critical section. Each flavor of RCU is tracked separately (but note that this is not the case in 2.6.32 and earlier). This allows lockdep's tracking to include RCU state, which can sometimes help when debugging deadlocks and the like.”h]”hX|All flavors of RCU have lockdep checking available, so that lockdep is aware of when each task enters and leaves any flavor of RCU read-side critical section. Each flavor of RCU is tracked separately (but note that this is not the case in 2.6.32 and earlier). This allows lockdep’s tracking to include RCU state, which can sometimes help when debugging deadlocks and the like.”…””}”(hhßh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´KhhÊh²hubhÞ)”}”(hŒOIn addition, RCU provides the following primitives that check lockdep's state::”h]”hŒPIn addition, RCU provides the following primitives that check lockdep’s state:”…””}”(hhíh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´KhhÊh²hubhŒ literal_block”“”)”}”(hX rcu_read_lock_held() for normal RCU. rcu_read_lock_bh_held() for RCU-bh. rcu_read_lock_sched_held() for RCU-sched. rcu_read_lock_any_held() for any of normal RCU, RCU-bh, and RCU-sched. srcu_read_lock_held() for SRCU. rcu_read_lock_trace_held() for RCU Tasks Trace.”h]”hX rcu_read_lock_held() for normal RCU. rcu_read_lock_bh_held() for RCU-bh. rcu_read_lock_sched_held() for RCU-sched. rcu_read_lock_any_held() for any of normal RCU, RCU-bh, and RCU-sched. srcu_read_lock_held() for SRCU. rcu_read_lock_trace_held() for RCU Tasks Trace.”…””}”hhýsbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1hûh³hÇh´KhhÊh²hubhÞ)”}”(hŒùThese functions are conservative, and will therefore return 1 if they aren't certain (for example, if CONFIG_DEBUG_LOCK_ALLOC is not set). This prevents things like WARN_ON(!rcu_read_lock_held()) from giving false positives when lockdep is disabled.”h]”hŒûThese functions are conservative, and will therefore return 1 if they aren’t certain (for example, if CONFIG_DEBUG_LOCK_ALLOC is not set). This prevents things like WARN_ON(!rcu_read_lock_held()) from giving false positives when lockdep is disabled.”…””}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´KhhÊh²hubhÞ)”}”(hŒrIn addition, a separate kernel config parameter CONFIG_PROVE_RCU enables checking of rcu_dereference() primitives:”h]”hŒrIn addition, a separate kernel config parameter CONFIG_PROVE_RCU enables checking of rcu_dereference() primitives:”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´KhhÊh²hubhŒ block_quote”“”)”}”(hXrcu_dereference(p): Check for RCU read-side critical section. rcu_dereference_bh(p): Check for RCU-bh read-side critical section. rcu_dereference_sched(p): Check for RCU-sched read-side critical section. srcu_dereference(p, sp): Check for SRCU read-side critical section. rcu_dereference_check(p, c): Use explicit check expression "c" along with rcu_read_lock_held(). This is useful in code that is invoked by both RCU readers and updaters. rcu_dereference_bh_check(p, c): Use explicit check expression "c" along with rcu_read_lock_bh_held(). This is useful in code that is invoked by both RCU-bh readers and updaters. rcu_dereference_sched_check(p, c): Use explicit check expression "c" along with rcu_read_lock_sched_held(). This is useful in code that is invoked by both RCU-sched readers and updaters. srcu_dereference_check(p, c): Use explicit check expression "c" along with srcu_read_lock_held(). This is useful in code that is invoked by both SRCU readers and updaters. rcu_dereference_raw(p): Don't check. (Use sparingly, if at all.) rcu_dereference_raw_check(p): Don't do lockdep at all. (Use sparingly, if at all.) rcu_dereference_protected(p, c): Use explicit check expression "c", and omit all barriers and compiler constraints. This is useful when the data structure cannot change, for example, in code that is invoked only by updaters. rcu_access_pointer(p): Return the value of the pointer and omit all barriers, but retain the compiler constraints that prevent duplicating or coalescing. This is useful when testing the value of the pointer itself, for example, against NULL. ”h]”hŒdefinition_list”“”)”}”(hhh]”(hŒdefinition_list_item”“”)”}”(hŒ=rcu_dereference(p): Check for RCU read-side critical section.”h]”(hŒterm”“”)”}”(hŒrcu_dereference(p):”h]”hŒrcu_dereference(p):”…””}”(hj:h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j8h³hÇh´K hj4ubhŒ definition”“”)”}”(hhh]”hÞ)”}”(hŒ)Check for RCU read-side critical section.”h]”hŒ)Check for RCU read-side critical section.”…””}”(hjMh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´K!hjJubah}”(h]”h ]”h"]”h$]”h&]”uh1jHhj4ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j2h³hÇh´K hj/ubj3)”}”(hŒCrcu_dereference_bh(p): Check for RCU-bh read-side critical section.”h]”(j9)”}”(hŒrcu_dereference_bh(p):”h]”hŒrcu_dereference_bh(p):”…””}”(hjkh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j8h³hÇh´K"hjgubjI)”}”(hhh]”hÞ)”}”(hŒ,Check for RCU-bh read-side critical section.”h]”hŒ,Check for RCU-bh read-side critical section.”…””}”(hj|h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´K#hjyubah}”(h]”h ]”h"]”h$]”h&]”uh1jHhjgubeh}”(h]”h ]”h"]”h$]”h&]”uh1j2h³hÇh´K"hj/ubj3)”}”(hŒIrcu_dereference_sched(p): Check for RCU-sched read-side critical section.”h]”(j9)”}”(hŒrcu_dereference_sched(p):”h]”hŒrcu_dereference_sched(p):”…””}”(hjšh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j8h³hÇh´K$hj–ubjI)”}”(hhh]”hÞ)”}”(hŒ/Check for RCU-sched read-side critical section.”h]”hŒ/Check for RCU-sched read-side critical section.”…””}”(hj«h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´K%hj¨ubah}”(h]”h ]”h"]”h$]”h&]”uh1jHhj–ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j2h³hÇh´K$hj/ubj3)”}”(hŒCsrcu_dereference(p, sp): Check for SRCU read-side critical section.”h]”(j9)”}”(hŒsrcu_dereference(p, sp):”h]”hŒsrcu_dereference(p, sp):”…””}”(hjÉh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j8h³hÇh´K&hjÅubjI)”}”(hhh]”hÞ)”}”(hŒ*Check for SRCU read-side critical section.”h]”hŒ*Check for SRCU read-side critical section.”…””}”(hjÚh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´K'hj×ubah}”(h]”h ]”h"]”h$]”h&]”uh1jHhjÅubeh}”(h]”h ]”h"]”h$]”h&]”uh1j2h³hÇh´K&hj/ubj3)”}”(hŒ©rcu_dereference_check(p, c): Use explicit check expression "c" along with rcu_read_lock_held(). This is useful in code that is invoked by both RCU readers and updaters.”h]”(j9)”}”(hŒrcu_dereference_check(p, c):”h]”hŒrcu_dereference_check(p, c):”…””}”(hjøh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j8h³hÇh´K*hjôubjI)”}”(hhh]”hÞ)”}”(hŒŒUse explicit check expression "c" along with rcu_read_lock_held(). This is useful in code that is invoked by both RCU readers and updaters.”h]”hŒUse explicit check expression “c†along with rcu_read_lock_held(). This is useful in code that is invoked by both RCU readers and updaters.”…””}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´K)hjubah}”(h]”h ]”h"]”h$]”h&]”uh1jHhjôubeh}”(h]”h ]”h"]”h$]”h&]”uh1j2h³hÇh´K*hj/ubj3)”}”(hŒ²rcu_dereference_bh_check(p, c): Use explicit check expression "c" along with rcu_read_lock_bh_held(). This is useful in code that is invoked by both RCU-bh readers and updaters.”h]”(j9)”}”(hŒrcu_dereference_bh_check(p, c):”h]”hŒrcu_dereference_bh_check(p, c):”…””}”(hj'h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j8h³hÇh´K.hj#ubjI)”}”(hhh]”hÞ)”}”(hŒ’Use explicit check expression "c" along with rcu_read_lock_bh_held(). This is useful in code that is invoked by both RCU-bh readers and updaters.”h]”hŒ–Use explicit check expression “c†along with rcu_read_lock_bh_held(). This is useful in code that is invoked by both RCU-bh readers and updaters.”…””}”(hj8h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´K-hj5ubah}”(h]”h ]”h"]”h$]”h&]”uh1jHhj#ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j2h³hÇh´K.hj/ubj3)”}”(hŒ»rcu_dereference_sched_check(p, c): Use explicit check expression "c" along with rcu_read_lock_sched_held(). This is useful in code that is invoked by both RCU-sched readers and updaters.”h]”(j9)”}”(hŒ"rcu_dereference_sched_check(p, c):”h]”hŒ"rcu_dereference_sched_check(p, c):”…””}”(hjVh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j8h³hÇh´K2hjRubjI)”}”(hhh]”hÞ)”}”(hŒ˜Use explicit check expression "c" along with rcu_read_lock_sched_held(). This is useful in code that is invoked by both RCU-sched readers and updaters.”h]”hŒœUse explicit check expression “c†along with rcu_read_lock_sched_held(). This is useful in code that is invoked by both RCU-sched readers and updaters.”…””}”(hjgh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´K1hjdubah}”(h]”h ]”h"]”h$]”h&]”uh1jHhjRubeh}”(h]”h ]”h"]”h$]”h&]”uh1j2h³hÇh´K2hj/ubj3)”}”(hŒ¬srcu_dereference_check(p, c): Use explicit check expression "c" along with srcu_read_lock_held(). This is useful in code that is invoked by both SRCU readers and updaters.”h]”(j9)”}”(hŒsrcu_dereference_check(p, c):”h]”hŒsrcu_dereference_check(p, c):”…””}”(hj…h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j8h³hÇh´K6hjubjI)”}”(hhh]”hÞ)”}”(hŒŽUse explicit check expression "c" along with srcu_read_lock_held(). This is useful in code that is invoked by both SRCU readers and updaters.”h]”hŒ’Use explicit check expression “c†along with srcu_read_lock_held(). This is useful in code that is invoked by both SRCU readers and updaters.”…””}”(hj–h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´K5hj“ubah}”(h]”h ]”h"]”h$]”h&]”uh1jHhjubeh}”(h]”h ]”h"]”h$]”h&]”uh1j2h³hÇh´K6hj/ubj3)”}”(hŒArcu_dereference_raw(p): Don't check. (Use sparingly, if at all.)”h]”(j9)”}”(hŒrcu_dereference_raw(p):”h]”hŒrcu_dereference_raw(p):”…””}”(hj´h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j8h³hÇh´K8hj°ubjI)”}”(hhh]”hÞ)”}”(hŒ)Don't check. (Use sparingly, if at all.)”h]”hŒ+Don’t check. (Use sparingly, if at all.)”…””}”(hjÅh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´K9hjÂubah}”(h]”h ]”h"]”h$]”h&]”uh1jHhj°ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j2h³hÇh´K8hj/ubj3)”}”(hŒSrcu_dereference_raw_check(p): Don't do lockdep at all. (Use sparingly, if at all.)”h]”(j9)”}”(hŒrcu_dereference_raw_check(p):”h]”hŒrcu_dereference_raw_check(p):”…””}”(hjãh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j8h³hÇh´K:hjßubjI)”}”(hhh]”hÞ)”}”(hŒ5Don't do lockdep at all. (Use sparingly, if at all.)”h]”hŒ7Don’t do lockdep at all. (Use sparingly, if at all.)”…””}”(hjôh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´K;hjñubah}”(h]”h ]”h"]”h$]”h&]”uh1jHhjßubeh}”(h]”h ]”h"]”h$]”h&]”uh1j2h³hÇh´K:hj/ubj3)”}”(hŒárcu_dereference_protected(p, c): Use explicit check expression "c", and omit all barriers and compiler constraints. This is useful when the data structure cannot change, for example, in code that is invoked only by updaters.”h]”(j9)”}”(hŒ rcu_dereference_protected(p, c):”h]”hŒ rcu_dereference_protected(p, c):”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j8h³hÇh´K?hjubjI)”}”(hhh]”hÞ)”}”(hŒÀUse explicit check expression "c", and omit all barriers and compiler constraints. This is useful when the data structure cannot change, for example, in code that is invoked only by updaters.”h]”hŒÄUse explicit check expression “câ€, and omit all barriers and compiler constraints. This is useful when the data structure cannot change, for example, in code that is invoked only by updaters.”…””}”(hj#h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´K=hj ubah}”(h]”h ]”h"]”h$]”h&]”uh1jHhjubeh}”(h]”h ]”h"]”h$]”h&]”uh1j2h³hÇh´K?hj/ubj3)”}”(hŒórcu_access_pointer(p): Return the value of the pointer and omit all barriers, but retain the compiler constraints that prevent duplicating or coalescing. This is useful when testing the value of the pointer itself, for example, against NULL. ”h]”(j9)”}”(hŒrcu_access_pointer(p):”h]”hŒrcu_access_pointer(p):”…””}”(hjAh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j8h³hÇh´KEhj=ubjI)”}”(hhh]”hÞ)”}”(hŒÛReturn the value of the pointer and omit all barriers, but retain the compiler constraints that prevent duplicating or coalescing. This is useful when testing the value of the pointer itself, for example, against NULL.”h]”hŒÛReturn the value of the pointer and omit all barriers, but retain the compiler constraints that prevent duplicating or coalescing. This is useful when testing the value of the pointer itself, for example, against NULL.”…””}”(hjRh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´KBhjOubah}”(h]”h ]”h"]”h$]”h&]”uh1jHhj=ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j2h³hÇh´KEhj/ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j-hj)ubah}”(h]”h ]”h"]”h$]”h&]”uh1j'h³hÇh´K hhÊh²hubhÞ)”}”(hŒ·The rcu_dereference_check() check expression can be any boolean expression, but would normally include a lockdep expression. For a moderately ornate example, consider the following::”h]”hŒ¶The rcu_dereference_check() check expression can be any boolean expression, but would normally include a lockdep expression. For a moderately ornate example, consider the following:”…””}”(hjxh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´KGhhÊh²hubhü)”}”(hŒ«file = rcu_dereference_check(fdt->fd[fd], lockdep_is_held(&files->file_lock) || atomic_read(&files->count) == 1);”h]”hŒ«file = rcu_dereference_check(fdt->fd[fd], lockdep_is_held(&files->file_lock) || atomic_read(&files->count) == 1);”…””}”hj†sbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1hûh³hÇh´KKhhÊh²hubhÞ)”}”(hŒ›This expression picks up the pointer "fdt->fd[fd]" in an RCU-safe manner, and, if CONFIG_PROVE_RCU is configured, verifies that this expression is used in:”h]”hŒŸThis expression picks up the pointer “fdt->fd[fd]†in an RCU-safe manner, and, if CONFIG_PROVE_RCU is configured, verifies that this expression is used in:”…””}”(hj”h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´KOhhÊh²hubhŒenumerated_list”“”)”}”(hhh]”(hŒ list_item”“”)”}”(hŒ0An RCU read-side critical section (implicit), or”h]”hÞ)”}”(hj«h]”hŒ0An RCU read-side critical section (implicit), or”…””}”(hj­h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´KShj©ubah}”(h]”h ]”h"]”h$]”h&]”uh1j§hj¤h²hh³hÇh´Nubj¨)”}”(hŒwith files->file_lock held, or”h]”hÞ)”}”(hjÂh]”hŒwith files->file_lock held, or”…””}”(hjÄh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´KThjÀubah}”(h]”h ]”h"]”h$]”h&]”uh1j§hj¤h²hh³hÇh´Nubj¨)”}”(hŒon an unshared files_struct. ”h]”hÞ)”}”(hŒon an unshared files_struct.”h]”hŒon an unshared files_struct.”…””}”(hjÛh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´KUhj×ubah}”(h]”h ]”h"]”h$]”h&]”uh1j§hj¤h²hh³hÇh´Nubeh}”(h]”h ]”h"]”h$]”h&]”Œenumtype”Œarabic”Œprefix”hŒsuffix”Œ.”uh1j¢hhÊh²hh³hÇh´KSubhÞ)”}”(hX•In case (1), the pointer is picked up in an RCU-safe manner for vanilla RCU read-side critical sections, in case (2) the ->file_lock prevents any change from taking place, and finally, in case (3) the current task is the only task accessing the file_struct, again preventing any change from taking place. If the above statement was invoked only from updater code, it could instead be written as follows::”h]”hX”In case (1), the pointer is picked up in an RCU-safe manner for vanilla RCU read-side critical sections, in case (2) the ->file_lock prevents any change from taking place, and finally, in case (3) the current task is the only task accessing the file_struct, again preventing any change from taking place. If the above statement was invoked only from updater code, it could instead be written as follows:”…””}”(hjúh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´KWhhÊh²hubhü)”}”(hŒ·file = rcu_dereference_protected(fdt->fd[fd], lockdep_is_held(&files->file_lock) || atomic_read(&files->count) == 1);”h]”hŒ·file = rcu_dereference_protected(fdt->fd[fd], lockdep_is_held(&files->file_lock) || atomic_read(&files->count) == 1);”…””}”hjsbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1hûh³hÇh´K^hhÊh²hubhÞ)”}”(hX÷This would verify cases #2 and #3 above, and furthermore lockdep would complain even if this was used in an RCU read-side critical section unless one of these two cases held. Because rcu_dereference_protected() omits all barriers and compiler constraints, it generates better code than do the other flavors of rcu_dereference(). On the other hand, it is illegal to use rcu_dereference_protected() if either the RCU-protected pointer or the RCU-protected data that it points to can change concurrently.”h]”hX÷This would verify cases #2 and #3 above, and furthermore lockdep would complain even if this was used in an RCU read-side critical section unless one of these two cases held. Because rcu_dereference_protected() omits all barriers and compiler constraints, it generates better code than do the other flavors of rcu_dereference(). On the other hand, it is illegal to use rcu_dereference_protected() if either the RCU-protected pointer or the RCU-protected data that it points to can change concurrently.”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´KbhhÊh²hubhÞ)”}”(hX¬Like rcu_dereference(), when lockdep is enabled, RCU list and hlist traversal primitives check for being called from within an RCU read-side critical section. However, a lockdep expression can be passed to them as an additional optional argument. With this lockdep expression, these traversal primitives will complain only if the lockdep expression is false and they are called from outside any RCU read-side critical section.”h]”hX¬Like rcu_dereference(), when lockdep is enabled, RCU list and hlist traversal primitives check for being called from within an RCU read-side critical section. However, a lockdep expression can be passed to them as an additional optional argument. With this lockdep expression, these traversal primitives will complain only if the lockdep expression is false and they are called from outside any RCU read-side critical section.”…””}”(hj$h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´KjhhÊh²hubhÞ)”}”(hŒ²For example, the workqueue for_each_pwq() macro is intended to be used either within an RCU read-side critical section or with wq->mutex held. It is thus implemented as follows::”h]”hŒ±For example, the workqueue for_each_pwq() macro is intended to be used either within an RCU read-side critical section or with wq->mutex held. It is thus implemented as follows:”…””}”(hj2h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´KqhhÊh²hubhü)”}”(hŒ #define for_each_pwq(pwq, wq) list_for_each_entry_rcu((pwq), &(wq)->pwqs, pwqs_node, lock_is_held(&(wq->mutex).dep_map))”h]”hŒ #define for_each_pwq(pwq, wq) list_for_each_entry_rcu((pwq), &(wq)->pwqs, pwqs_node, lock_is_held(&(wq->mutex).dep_map))”…””}”hj@sbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1hûh³hÇh´KuhhÊh²hubeh}”(h]”Œrcu-and-lockdep-checking”ah ]”h"]”Œrcu and lockdep checking”ah$]”h&]”uh1hÈhhh²hh³hÇh´Kubeh}”(h]”h ]”h"]”h$]”h&]”Œsource”hÇuh1hŒcurrent_source”NŒ current_line”NŒsettings”Œdocutils.frontend”ŒValues”“”)”}”(hÍNŒ generator”NŒ datestamp”NŒ source_link”NŒ source_url”NŒ toc_backlinks”Œentry”Œfootnote_backlinks”KŒ sectnum_xform”KŒstrip_comments”NŒstrip_elements_with_classes”NŒ strip_classes”NŒ report_level”KŒ halt_level”KŒexit_status_level”KŒdebug”NŒwarning_stream”NŒ traceback”ˆŒinput_encoding”Œ utf-8-sig”Œinput_encoding_error_handler”Œstrict”Œoutput_encoding”Œutf-8”Œoutput_encoding_error_handler”jyŒerror_encoding”Œutf-8”Œerror_encoding_error_handler”Œbackslashreplace”Œ language_code”Œen”Œrecord_dependencies”NŒconfig”NŒ id_prefix”hŒauto_id_prefix”Œid”Œ dump_settings”NŒdump_internals”NŒdump_transforms”NŒdump_pseudo_xml”NŒexpose_internals”NŒstrict_visitor”NŒ_disable_config”NŒ_source”hÇŒ _destination”NŒ _config_files”]”Œ7/var/lib/git/docbuild/linux/Documentation/docutils.conf”aŒfile_insertion_enabled”ˆŒ raw_enabled”KŒline_length_limit”M'Œpep_references”NŒ pep_base_url”Œhttps://peps.python.org/”Œpep_file_url_template”Œpep-%04d”Œrfc_references”NŒ rfc_base_url”Œ&https://datatracker.ietf.org/doc/html/”Œ tab_width”KŒtrim_footnote_reference_space”‰Œsyntax_highlight”Œlong”Œ smart_quotes”ˆŒsmartquotes_locales”]”Œcharacter_level_inline_markup”‰Œdoctitle_xform”‰Œ docinfo_xform”KŒsectsubtitle_xform”‰Œ image_loading”Œlink”Œembed_stylesheet”‰Œcloak_email_addresses”ˆŒsection_self_link”‰Œenv”NubŒreporter”NŒindirect_targets”]”Œsubstitution_defs”}”Œsubstitution_names”}”Œrefnames”}”Œrefids”}”Œnameids”}”jSjPsŒ nametypes”}”jS‰sh}”jPhÊsŒ footnote_refs”}”Œ citation_refs”}”Œ autofootnotes”]”Œautofootnote_refs”]”Œsymbol_footnotes”]”Œsymbol_footnote_refs”]”Œ footnotes”]”Œ citations”]”Œautofootnote_start”KŒsymbol_footnote_start”KŒ id_counter”Œ collections”ŒCounter”“”}”…”R”Œparse_messages”]”Œtransform_messages”]”Œ transformer”NŒ include_log”]”Œ decoration”Nh²hub.