From owner-svn-src-all@FreeBSD.ORG Sun Apr 27 21:00:56 2014 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A14E4CEB; Sun, 27 Apr 2014 21:00:56 +0000 (UTC) Received: from mho-01-ewr.mailhop.org (mho-03-ewr.mailhop.org [204.13.248.66]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 743791E57; Sun, 27 Apr 2014 21:00:56 +0000 (UTC) Received: from c-24-8-230-52.hsd1.co.comcast.net ([24.8.230.52] helo=damnhippie.dyndns.org) by mho-01-ewr.mailhop.org with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.72) (envelope-from ) id 1WeWBz-00068O-5G; Sun, 27 Apr 2014 21:00:55 +0000 Received: from [172.22.42.240] (revolution.hippie.lan [172.22.42.240]) by damnhippie.dyndns.org (8.14.3/8.14.3) with ESMTP id s3RL0rTA014200; Sun, 27 Apr 2014 15:00:53 -0600 (MDT) (envelope-from ian@FreeBSD.org) X-Mail-Handler: Dyn Standard SMTP by Dyn X-Originating-IP: 24.8.230.52 X-Report-Abuse-To: abuse@dyndns.com (see http://www.dyndns.com/services/sendlabs/outbound_abuse.html for abuse reporting information) X-MHO-User: U2FsdGVkX19uV2COArGqmQA/FKUAsGGR Subject: Re: svn commit: r265019 - head/sys/net From: Ian Lepore To: "Alexander V. Chernikov" In-Reply-To: <201404271741.s3RHfIYF058370@svn.freebsd.org> References: <201404271741.s3RHfIYF058370@svn.freebsd.org> Content-Type: text/plain; charset="us-ascii" Date: Sun, 27 Apr 2014 15:00:53 -0600 Message-ID: <1398632453.61646.182.camel@revolution.hippie.lan> Mime-Version: 1.0 X-Mailer: Evolution 2.32.1 FreeBSD GNOME Team Port Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 27 Apr 2014 21:00:56 -0000 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