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

Davide Italiano davide at freebsd.org
Sat Mar 28 18:59:12 UTC 2015


On Sat, Mar 28, 2015 at 5:50 AM, Randall Stewart <rrs at freebsd.org> 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).
>

trim
[...]

> Modified: head/sys/sys/_callout.h
> ==============================================================================
> --- head/sys/sys/_callout.h     Sat Mar 28 12:23:15 2015        (r280784)
> +++ head/sys/sys/_callout.h     Sat Mar 28 12:50:24 2015        (r280785)
> @@ -57,7 +57,8 @@ struct callout {
>         void    *c_arg;                         /* function argument */
>         void    (*c_func)(void *);              /* function to call */
>         struct lock_object *c_lock;             /* lock to handle */
> -       int     c_flags;                        /* state of this entry */
> +       int     c_flags;                        /* User State */
> +       int     c_iflags;                       /* Internal State */
>         volatile int c_cpu;                     /* CPU we're scheduled on */
>  };
>

I skimmed this quickly, and I'm afraid I think this breaks the KBI,
increasing size of struct callout.
That said, if it's true and you agree, you should at least bump
FreeBSD version number.
In an ideal world, you should avoid breaking for bugfixes and not
architecural changes.

--
Davide


More information about the svn-src-head mailing list