Project

General

Profile

Bug #9914

NV_UNIQUE_NAME_TYPE broken after 9580

Added by Andrew Stormont 9 months ago. Updated 7 months ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
-
Start date:
2018-10-22
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
needs-triage

Description

There's a typo in nvt_remove_nvpair which causes the nvlist_add_* functions to ignore the type when removing entries with the given name/type. This can lead to the wrong entry being removed and multiple entries being created with the same type.

This was uncovered by some unit tests we had for some code that makes use of NV_UNIQUE_NAME. With the fix applied the tests started passing again. It was also observed that code calling into libnvpair was leaking. The leaks also went away after the fix.


Related issues

Related to illumos gate - Feature #9580: Add a hash-table on top of nvlist to speed-up operationsClosed2018-06-05

Actions

History

#1

Updated by Andrew Stormont 9 months ago

  • Related to Feature #9580: Add a hash-table on top of nvlist to speed-up operations added
#3

Updated by Andrew Stormont 7 months ago

  • Description updated (diff)
#4

Updated by Electric Monk 7 months ago

  • Status changed from New to Closed
  • % Done changed from 0 to 100

git commit b8a5bee186f188738b6a8f63ebf28331543ae32e

commit  b8a5bee186f188738b6a8f63ebf28331543ae32e
Author: Andrew Stormont <astormont@racktopsystems.com>
Date:   2018-12-10T16:00:16.000Z

    9914 NV_UNIQUE_NAME_TYPE broken after 9580
    Reviewed by: Yuri Pankov <yuripv@yuripv.net>
    Reviewed by: Garrett D'Amore <garrett@damore.org>
    Reviewed by: Andy Fiddaman <omnios@citrus-it.co.uk>
    Approved by: Dan McDonald <danmcd@joyent.com>

Also available in: Atom PDF