Linux Kernel hash table iteration gives NULL pointer
I’m writing a kernel object that should keep a set of threads information and access them by tid.
For this purpose I’m using the hashtable data structure. Every time I get a thread info, I should check if its tid is already in the table – and reset a counter, otherwise add a new structure. To check if the tid is already present, I use the hash_for_each
macro in this way: