···6969 value of the pointer itself, for example, against NULL.70707171The rcu_dereference_check() check expression can be any boolean7272-expression, but would normally include a lockdep expression. However,7373-any boolean expression can be used. For a moderately ornate example,7474-consider the following::7272+expression, but would normally include a lockdep expression. For a7373+moderately ornate example, consider the following::75747675 file = rcu_dereference_check(fdt->fd[fd],7776 lockdep_is_held(&files->file_lock) ||···9697 atomic_read(&files->count) == 1);97989899This would verify cases #2 and #3 above, and furthermore lockdep would9999-complain if this was used in an RCU read-side critical section unless one100100-of these two cases held. Because rcu_dereference_protected() omits all101101-barriers and compiler constraints, it generates better code than do the102102-other flavors of rcu_dereference(). On the other hand, it is illegal100100+complain even if this was used in an RCU read-side critical section unless101101+one of these two cases held. Because rcu_dereference_protected() omits102102+all barriers and compiler constraints, it generates better code than do103103+the other flavors of rcu_dereference(). On the other hand, it is illegal103104to use rcu_dereference_protected() if either the RCU-protected pointer104105or the RCU-protected data that it points to can change concurrently.105106