kern/145865: kernel memory leak with disabled devd and
hw.bus.devctl_disable=1
Mateusz Guzik
mjguzik at gmail.com
Tue Apr 20 17:40:03 UTC 2010
The following reply was made to PR kern/145865; it has been noted by GNATS.
From: Mateusz Guzik <mjguzik at gmail.com>
To: bug-followup at FreeBSD.org, littlesavage at orionet.ru
Cc:
Subject: Re: kern/145865: kernel memory leak with disabled devd and
hw.bus.devctl_disable=1
Date: Tue, 20 Apr 2010 19:33:28 +0200
devctl_queue_length is checked twice.
1)
if (devctl_queue_length == 0)
return;
So we leak message passed by the caller.
2)
mtx_lock(&devsoftc.mtx);
if (devctl_queue_length == 0) {
free(n1->dei_data, M_BUS);
free(n1, M_BUS);
return;
}
So we can return with lock held where we shouldn't (or I'm
misinterpreting something).
How about this patch then:
http://student.agh.edu.pl/~mjguzik/subr_bus.diff
--
Mateusz Guzik
More information about the freebsd-bugs
mailing list