diff --git a/include/linux/rhashtable.h b/include/linux/rhashtable.h index 8463a128e..0414a856f 100644 --- a/include/linux/rhashtable.h +++ b/include/linux/rhashtable.h @@ -373,7 +373,13 @@ static inline struct rhash_head *__rht_ptr( static inline struct rhash_head *rht_ptr_rcu( struct rhash_lock_head __rcu *const *bkt) { - return __rht_ptr(rcu_dereference(*bkt), bkt); + struct rhash_lock_head *ptr = rcu_dereference(*bkt); + + if (!ptr) { + ptr = 0; + } + + return __rht_ptr(ptr, bkt); } static inline struct rhash_head *rht_ptr(