segfault: context_map gc: use llist_for_each_entry_safe()
The context map garbage collector removes entries from the list, hence it must use llist_for_each_entry_safe(). We haven't hit this before since nothing is yet flagging context maps to be discarded. Related: OS#2776 Change-Id: I9d5899923054d1bf862d542fec862fb1e6f07dce
This commit is contained in:
parent
f33d16404d
commit
aa3e9ebcb4
|
@ -146,10 +146,10 @@ static void context_map_tmr_cb(void *data)
|
|||
{
|
||||
struct hnb_gw *gw = data;
|
||||
struct hnbgw_cnlink *cn = gw->sccp.cnlink;
|
||||
struct hnbgw_context_map *map;
|
||||
struct hnbgw_context_map *map, *next_map;
|
||||
|
||||
DEBUGP(DMAIN, "Running context mapper garbage collection\n");
|
||||
llist_for_each_entry(map, &cn->map_list, cn_list) {
|
||||
llist_for_each_entry_safe(map, next_map, &cn->map_list, cn_list) {
|
||||
switch (map->state) {
|
||||
case MAP_S_RESERVED1:
|
||||
/* first time we see this reserved
|
||||
|
|
Loading…
Reference in New Issue