NetBSD-Bugs archive

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

Re: kern/41154: possible races in NFS server code ?



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

From: Manuel Bouyer <bouyer%antioche.eu.org@localhost>
To: Andrew Doran <ad%netbsd.org@localhost>
Cc: gnats-bugs%netbsd.org@localhost
Subject: Re: kern/41154: possible races in NFS server code ?
Date: Wed, 8 Apr 2009 22:17:41 +0200

 On Wed, Apr 08, 2009 at 08:08:42PM +0000, Andrew Doran wrote:
 > On Wed, Apr 08, 2009 at 09:23:33PM +0200, Manuel Bouyer wrote:
 > 
 > > @@ -889,9 +887,12 @@
 > >                    closef(fp);
 > 
 > Calling closef() while holding nfsd_lock makes me uncomfortable. In this
 > case we know it is a socket, so I think it should be OK, but there could be
 > unexpected deadlocks. Better to free it afterwards I think..
 
 In my patch it'a already after nfsd_lock has been released; it's released
 just after TAILQ_REMOVE(&nfssvc_sockhead ...
 We used to release the lock just before testing SLP_VALID and reaquire it just
 after, my patch just remove this mutex_exit/mutex_enter around a
 test. What may have confused you is that because of this there is also
 a mutex_exit() in the other branch of the test. But the only thing that
 happen locked which was not before is the SLP_VALID test.
 
 
 -- 
 Manuel Bouyer <bouyer%antioche.eu.org@localhost>
      NetBSD: 26 ans d'experience feront toujours la difference
 --
 


Home | Main Index | Thread Index | Old Index