The following reply was made to PR kern/145865; it has been noted by GNATS.

From: Mateusz Guzik <[email protected]>
To: [email protected], [email protected]
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
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "[email protected]"

Reply via email to