commit
82523f19 changed the error-exit path of _stp_pmap_agg, but was
confused by the multiple (three!) levels of nested loops in effect at
the point of failure. While the prior "return;" skipped an overall
(newly needed) aggregate-unlock; the current "break;" skipped too
little. Switch to a proper simple goto to almost but not quite
return;.
_stp_add_agg(aptr, ptr);
else {
if (!_stp_new_agg(agg, ahead, ptr)) {
- quit = 1;
- agg = NULL;
- break;
+ MAP_UNLOCK(m);
+ agg = NULL;
+ goto out;
+ // NB: break would head out to the for (hash...)
+ // loop, which behaves badly with an agg==NULL.
}
}
}
}
MAP_UNLOCK(m);
- if (quit)
- break;
}
+
+ out:
#ifndef __KERNEL__
TLS_DATA_CONTAINER_UNLOCK(&pmap->container);
#endif