Please sign in to comment.
Fix ambiguous parsing of *node* entries in /sys.
The code used to use strstr(..., "node") while iterating over sysfs directories such as /sys/devices/system/cpu/cpu*. It then made an assumption that the entry would start with "node", which is not necessarily the case (e.g. the "firmware_node" entry). The code happened to work for as long as the node[0-9]* entry would be processed before the "firmware_node" entry shows up. A change to the linux kernel "end_name_hash" function resulted in a different hash, and ultimately in a different order by which entries were returned by readdir(3). This led to the exposure of this bug. Signed-off-by: Gerd Rausch <firstname.lastname@example.org>
- Loading branch information...