svn commit: r280785 - in head/sys: kern netgraph/atm/sscop netgraph/atm/uni sys

Mark Johnston markj at FreeBSD.org
Fri Apr 10 04:15:15 UTC 2015


On Sat, Mar 28, 2015 at 12:50:24PM +0000, Randall Stewart wrote:
> Author: rrs
> Date: Sat Mar 28 12:50:24 2015
> New Revision: 280785
> URL: https://svnweb.freebsd.org/changeset/base/280785
> 
> Log:
>   Change the callout to supply -1 to indicate we are not changing
>   CPU, also add protection against invalid CPU's as well as
>   split c_flags and c_iflags so that if a user plays with the active
>   flag (the one expected to be played with by callers in MPSAFE) without
>   a lock, it won't adversely affect the callout system by causing a corrupt
>   list. This also means that all callers need to use the macros and *not*
>   play with the falgs directly (like netgraph used to).
>   
>   Differential Revision: htts://reviews.freebsd.org/D1894
>   Reviewed by: .. timed out but looked at by jhb, imp, adrian hselasky
>                tested by hiren and netflix.
>   Sponsored by:	Netflix Inc.
> 
> Modified:
>   head/sys/kern/kern_timeout.c
>   head/sys/netgraph/atm/sscop/ng_sscop_cust.h
>   head/sys/netgraph/atm/uni/ng_uni_cust.h
>   head/sys/sys/_callout.h
>   head/sys/sys/callout.h
> 
> Modified: head/sys/kern/kern_timeout.c
> ==============================================================================
> --- head/sys/kern/kern_timeout.c	Sat Mar 28 12:23:15 2015	(r280784)
> +++ head/sys/kern/kern_timeout.c	Sat Mar 28 12:50:24 2015	(r280785)
> [...]
>  	/* 
>  	 * This flag used to be added by callout_cc_add, but the
>  	 * first time you call this we could end up with the
>  	 * wrong direct flag if we don't do it before we add.
>  	 */
>  	if (flags & C_DIRECT_EXEC) {
> -		c->c_flags |= CALLOUT_DIRECT;
> +		direct = 1;
> +	} else {
> +		direct = 0;
>  	}
> [...]

Hello,

With this change, C_DIRECT_EXEC appears to have stopped working. In
particular, I don't see any way for the CALLOUT_DIRECT flag to be set
anymore. Re-adding the deleted line above with s/c_flags/c_iflags/ fixes
the problem for me, but I have not tested it extensively.

-Mark


More information about the svn-src-head mailing list