Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 22 May 2013 13:12:32 +0200
From:      Mateusz Guzik <mjguzik@gmail.com>
To:        Gleb Smirnoff <glebius@FreeBSD.org>
Cc:        svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, pjd@FreeBSD.org
Subject:   Re: svn commit: r250890 - head/sys/kern
Message-ID:  <20130522111232.GB11792@dft-labs.eu>
In-Reply-To: <20130522092148.GM67170@FreeBSD.org>
References:  <201305212158.r4LLw1Ed076595@svn.freebsd.org> <20130522092148.GM67170@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, May 22, 2013 at 01:21:48PM +0400, Gleb Smirnoff wrote:
> On Tue, May 21, 2013 at 09:58:01PM +0000, Mateusz Guzik wrote:
> M> Author: mjg
> M> Date: Tue May 21 21:58:00 2013
> M> New Revision: 250890
> M> URL: http://svnweb.freebsd.org/changeset/base/250890
> M> 
> M> Log:
> M>   passing fd over unix socket: fix a corner case where caller
> M>   wants to pass no descriptors.
> M>   
> M>   Previously the kernel would leak memory and try to free a potentially
> M>   arbitrary pointer.
> M>   
> M>   Reviewed by:	pjd
> 
> Is it possible to make code more strict: assert that fdcount > 0, and
> do not perform any processing if number of fds is 0?
> 

stable/9 returns with a non-zero length message in such cases and your
patch changes it. Apparently with your patch we would get behaviour
present in Linux. Whether it matters in practice I don't know.

That being said I have no strong opinion either way. If you want, please
go ahead and change this.
-- 
Mateusz Guzik <mjguzik gmail.com>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20130522111232.GB11792>