mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-23 11:18:54 +00:00
Fix panic on table/table entry delete. The panic could have happened
if more than 64 distinct values had been used. Table value code uses internal objhash API which requires unique key for each object. For value code, pointer to the actual value data is used. The actual problem arises from the fact that 'actual' e.g. runtime data is stored in array and that array is auto-growing. There is special hook (update_tvalue() function) which is used to update the pointers after the change. For some reason, object 'key' was not updated. Fix this by adding update code to the update_tvalue(). Sponsored by: Yandex LLC
This commit is contained in:
parent
af6f4233fd
commit
fa7c058bf8
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=294525
@ -158,6 +158,7 @@ update_tvalue(struct namedobj_instance *ni, struct named_object *no, void *arg)
|
||||
|
||||
pval = da->pval;
|
||||
ptv->pval = &pval[ptv->no.kidx];
|
||||
ptv->no.name = (char *)&pval[ptv->no.kidx];
|
||||
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user