mutex_lock(&hwspinlock_tree_lock);/* make sure this hwspinlock exists */hwlock =radix_tree_lookup(&hwspinlock_tree, id);if(!hwlock) { pr_warn("hwspinlock %u does not exist\n", id);gotoout; }/* sanity check (this shouldn't happen) */WARN_ON(hwlock_to_id(hwlock) != id);/* ...
[156926.614302] Krnl PSW : 0704e00180000000 0000000000487e28 (__radix_tree_lookup+0x50/0x118) [156926.614345] R:0 T:1 IO:1 EX:1 Key:0 M:1 W:0 P:0 AS:3 CC:2 PM:0 EA:3 Krnl GPRS: 0000000000278940 3a8af8e7c9e25e35 0000000000000001 3a8af8e7c9e25e34 [156926.614356] 0000000000000000...
The kernel crashes in __radix_tree_lookup() with a strange page table entry that causes wrong swap entry and mapping Raw [4683121.502778] BUG: unable to handle kernel paging request at ffffa8249ac4ad60 [4683121.511678] IP: [<ffffffff8b9a397c>] __radix_tree_lookup+0x2c/0x100 [4683121.520...
(So, radix_tree_gang_lookup_tag_slot() cannot return forever.) radix_tree_gang_lookup_tag_slot(): 1178 while (ret < max_items) { 1179 unsigned int slots_found; 1180 unsigned long next_index; /* Index of next search */ 1181 1182 if (cur_index > max_index) 1183 break; 1184 ...