NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

misc/51285: Missing dt_proc_unlock in dt_module.c



>Number:         51285
>Category:       misc
>Synopsis:       Missing dt_proc_unlock in dt_module.c
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    misc-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Jun 27 08:05:00 +0000 2016
>Originator:     Henning Petersen
>Release:        Netbsd-current
>Organization:
>Environment:
>Description:
In error path is missing one dt_proc_unlock.
>How-To-Repeat:

>Fix:
diff -u -p -r1.12 dt_module.c
--- external/cddl/osnet/dist/lib/libdtrace/common/dt_module.c	6 Oct 2015 01:18:47 -0000	1.12
+++ external/cddl/osnet/dist/lib/libdtrace/common/dt_module.c	14 Apr 2016 05:25:58 -0000
@@ -713,6 +713,7 @@ dt_module_load_proc(dtrace_hdl_t *dtp, d
 	arg.dpa_count = 0;
 	if (Pobject_iter_resolved(p, dt_module_load_proc_count, &arg) != 0) {
 		dt_dprintf("failed to iterate objects\n");
+		dt_proc_unlock(dtp, p);
 		dt_proc_release(dtp, p);
 		return (dt_set_errno(dtp, EDT_CANTLOAD));
 	}



Home | Main Index | Thread Index | Old Index