kernel: Store "next" pointer before notifying B_EVENT_INVALID.
Once B_EVENT_INVALID has been set, the select routine is free to delete the select_info at any time. We therefore cannot access the "next" pointer after notify_select_events returns. May fix a KDL seen by trungnt2910.
This commit is contained in:
parent
d8365e0f0f
commit
2d43eebcab
@ -745,8 +745,9 @@ notify_select_events_list(select_info* list, uint16 events)
|
||||
{
|
||||
struct select_info* info = list;
|
||||
while (info != NULL) {
|
||||
select_info* next = info->next;
|
||||
notify_select_events(info, events);
|
||||
info = info->next;
|
||||
info = next;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -556,8 +556,9 @@ deselect_select_infos(file_descriptor* descriptor, select_info* infos,
|
||||
}
|
||||
}
|
||||
|
||||
select_info* next = info->next;
|
||||
notify_select_events(info, B_EVENT_INVALID);
|
||||
info = info->next;
|
||||
info = next;
|
||||
|
||||
if (putSyncObjects)
|
||||
put_select_sync(sync);
|
||||
|
@ -2242,9 +2242,10 @@ thread_exit(void)
|
||||
while (info != NULL) {
|
||||
select_sync* sync = info->sync;
|
||||
|
||||
select_info* next = info->next;
|
||||
notify_select_events(info, B_EVENT_INVALID);
|
||||
info = info->next;
|
||||
put_select_sync(sync);
|
||||
info = next;
|
||||
}
|
||||
|
||||
// notify listeners
|
||||
|
Loading…
x
Reference in New Issue
Block a user