Date: Sat, 13 Jul 2013 19:33:01 -0700 From: Adrian Chadd <adrian@freebsd.org> To: Mikolaj Golub <trociny@freebsd.org> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r253314 - head/sys/net Message-ID: <CAJ-VmokzUD_iW-6Guhawg%2B9xwJHnoPR=N3=tKHaxYNBVrmbu0A@mail.gmail.com> In-Reply-To: <20130713082158.GD2757@gmail.com> References: <201307130425.r6D4P31J078644@svn.freebsd.org> <20130713082158.GD2757@gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
I'll double-check at work on Monday and commit an update.
Thanks!
-adrian
On 13 July 2013 01:21, Mikolaj Golub <trociny@freebsd.org> wrote:
> On Sat, Jul 13, 2013 at 04:25:03AM +0000, Adrian Chadd wrote:
>
>> +static int
>> +lagg_sysctl_active(SYSCTL_HANDLER_ARGS)
>> +{
>> + struct lagg_softc *sc = (struct lagg_softc *)arg1;
>> + struct lagg_port *lp;
>> + int error;
>> +
>> + /* LACP tracks active links automatically, the others do not */
>> + if (sc->sc_proto != LAGG_PROTO_LACP) {
>> + sc->sc_active = 0;
>> + SLIST_FOREACH(lp, &sc->sc_ports, lp_entries)
>> + sc->sc_active += LAGG_PORTACTIVE(lp);
>
> Shouldn't sc be wlocked here?
>
>> + }
>> +
>> + error = sysctl_handle_int(oidp, &sc->sc_active, 0, req);
>> + if ((error) || (req->newptr == NULL))
>> + return (error);
>> +
>> + return (0);
>> +}
>
> --
> Mikolaj Golub
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAJ-VmokzUD_iW-6Guhawg%2B9xwJHnoPR=N3=tKHaxYNBVrmbu0A>
