svn commit: r265019 - head/sys/net
Alexander V. Chernikov
melifaro at FreeBSD.org
Sun Apr 27 21:22:49 UTC 2014
On 28.04.2014 01:00, Ian Lepore wrote:
> 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:
Fixed. Thanks again.
It looks like something wrong has happened to my clang setup..
>
> 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
>
>
>
More information about the svn-src-all
mailing list