lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Thu, 3 Aug 2006 11:22:23 +1000
From:	Neil Brown <neilb@...e.de>
To:	"J. Bruce Fields" <bfields@...ldses.org>
Cc:	Andrew Morton <akpm@...l.org>, nfs@...ts.sourceforge.net,
	linux-kernel@...r.kernel.org
Subject: Re: [NFS] [PATCH 000 of 4] knfsd: Introduction

On Friday July 28, bfields@...ldses.org wrote:
> On Fri, Jul 28, 2006 at 03:09:40PM +1000, NeilBrown wrote:
> > Following are 4 patches for knfsd in 2.6-mm-latest.  They address some
> > issues found by Bruce Fields greatly appreciated patch review.  Thanks Bruce.
> > They (like the patches they build on) are *not* 2.6.18 material.
> 
> By the way, the one thing that looked to me like a real bug was the
> failure to do a lockd_down() when the user deletes a socket (comments
> resent below), which these patches don't seem to deal with.  Of course,
> it's entirely possible I just didn't understand something....
> 

Ofcourse, it is also entirely possible that you understand perfectly,
and that seems to be the case here.  If the svc_sock_names call in
write_ports returns success, we should do a 'lockd_down' - and make
sure it does return success only if the close succeeded.


> --b.
> 
> 
> On Tue, Jul 25, 2006 at 11:55:08AM +1000, NeilBrown wrote:
> > +		err = nfsd_create_serv();
> > +		if (!err) {
> > +			int proto = 0;
> > +			err = svc_addsock(nfsd_serv, fd, buf, &proto);
> > +			/* Decrease the count, but don't shutdown the
> > +			 * the service
> > +			 */
> > +			if (err >= 0)
> > +				lockd_up(proto);
> > +			nfsd_serv->sv_nrthreads--;
> ....
> > @@ -211,8 +211,6 @@ static inline int nfsd_create_serv(void)
> >  			       nfsd_last_thread);
> >  	if (nfsd_serv == NULL)
> >  		err = -ENOMEM;
> > -	else
> > -		nfsd_serv->sv_nrthreads++;
> 
> I don't understand these sv_nrthreads changes.
> 

The first is simply to counter the reference that was gained in
nfsd_create_serv. 

The second chunk (removing sv_nrthread++) is fixing a bug in an
earlier patch.  We never should have had that ++ there, as
'svc_create' created the object with a reference already.

Thanks,
NeilBrown
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ