Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 27 Apr 2014 15:00:53 -0600
From:      Ian Lepore <ian@FreeBSD.org>
To:        "Alexander V. Chernikov" <melifaro@FreeBSD.org>
Cc:        svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org
Subject:   Re: svn commit: r265019 - head/sys/net
Message-ID:  <1398632453.61646.182.camel@revolution.hippie.lan>
In-Reply-To: <201404271741.s3RHfIYF058370@svn.freebsd.org>
References:  <201404271741.s3RHfIYF058370@svn.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, 2014-04-27 at 17:41 +0000, Alexander V. Chernikov wrote:
> Author: melifaro
> Date: Sun Apr 27 17:41:18 2014
> New Revision: 265019
> URL: http://svnweb.freebsd.org/changeset/base/265019
> 
> Log:
>   Improve memory allocation model for rt_msg2() rtsock messages:
>    * memory is now allocated as early as possible, without holding locks.
>    * sysctl users are now guaranteed to get a response (M_WAITOK buffer prealloc).
>    * socket users are more likely to use on-stack buffer for replies.
>    * standard kernel malloc/free functions are now used instead of radix wrappers.
>   rt_msg2() has been renamed to rtsock_msg_buffer().
>   
>   MFC after:	1 month
> 
> Modified:
>   head/sys/net/rtsock.c
> 
> Modified: head/sys/net/rtsock.c
> [...]

You're on a roll this weekend. :)  I got another uninit-var warning
today -- I worked around it with this, but I'm not sure it's the right
way to fix it:

revolution > sd sys/net/rtsock.c
Index: sys/net/rtsock.c
===================================================================
--- sys/net/rtsock.c	(revision 265026)
+++ sys/net/rtsock.c	(working copy)
@@ -1132,7 +1132,8 @@ rtsock_msg_buffer(int type, struct rt_addrinfo *rt
 		rtm = (struct rt_msghdr *)w->w_tmem;
 		buflen = w->w_tmemsize - len;
 		cp = (caddr_t)w->w_tmem + len;
-	}
+	} else
+		cp = NULL;
 
 	rtinfo->rti_addrs = 0;
 	for (i = 0; i < RTAX_MAX; i++) {


-- Ian





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