svn commit: r250890 - head/sys/kern

Mateusz Guzik mjguzik at gmail.com
Wed May 22 11:12:39 UTC 2013


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>


More information about the svn-src-head mailing list