Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 28 May 2014 22:12:32 +0800
From:      Julian Elischer <julian@freebsd.org>
To:        Gleb Smirnoff <glebius@FreeBSD.org>, src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org, dmitryluhtionov@gmail.com
Subject:   Re: svn commit: r266806 - head/sys/netgraph
Message-ID:  <5385EED0.1010506@freebsd.org>
In-Reply-To: <201405281315.s4SDFEvc061176@svn.freebsd.org>
References:  <201405281315.s4SDFEvc061176@svn.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On 5/28/14, 9:15 PM, Gleb Smirnoff wrote:
> Author: glebius
> Date: Wed May 28 13:15:14 2014
> New Revision: 266806
> URL: http://svnweb.freebsd.org/changeset/base/266806
>
> Log:
>    Use M_WAITOK for the NGM_PIPE_SET_CFG control message. We expect it to
>    arrive from userland only.
>    
>    Submitted by:	Dmitry Luhtionov <dmitryluhtionov gmail.com>
what's to stop another node from generating it and sending it on?
generally a message may come from anywhere.
Just becasue YOU don't have module that
sends messages to ng_pipe, doesn't mean there never will be..
also there are cases when the locking may force a message to be 
delivered asynchronously.


>
> Modified:
>    head/sys/netgraph/ng_pipe.c
>
> Modified: head/sys/netgraph/ng_pipe.c
> ==============================================================================
> --- head/sys/netgraph/ng_pipe.c	Wed May 28 13:06:53 2014	(r266805)
> +++ head/sys/netgraph/ng_pipe.c	Wed May 28 13:15:14 2014	(r266806)
> @@ -471,7 +471,7 @@ parse_cfg(struct ng_pipe_hookcfg *curren
>   		if (hinfo->ber_p == NULL)
>   			hinfo->ber_p =
>   			    malloc((MAX_FSIZE + MAX_OHSIZE) * sizeof(uint64_t),
> -			    M_NG_PIPE, M_NOWAIT);
> +			    M_NG_PIPE, M_WAITOK);
>   		current->ber = new->ber;
>   
>   		/*
>
>




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