From owner-svn-src-all@FreeBSD.ORG Sat Mar 28 18:59:12 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F39805B9; Sat, 28 Mar 2015 18:59:11 +0000 (UTC) Received: from mail-la0-x22b.google.com (mail-la0-x22b.google.com [IPv6:2a00:1450:4010:c03::22b]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 740B593C; Sat, 28 Mar 2015 18:59:11 +0000 (UTC) Received: by lagg8 with SMTP id g8so92085072lag.1; Sat, 28 Mar 2015 11:59:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=bH0+YS5ArTVXDQ4R/M7ak5e2a7oL4WoSvAZExMvLqgU=; b=HYiGEY0Upf8nGGX0i6fLtAJ9WaW5ALwQ9cbzJdL+iViqG0wQT7c0BZBcdjHffoTLr1 gSbPESf1LC6JbE1C8+dbrG+LBi1Yr08nFzHjWuC914TuHnlNJ432NxIaxHWcg8Gmk+r9 /O+dUnxUR9LDe20LlK4ZBU0KWMgQNVCAlc+Dj7o/KDetisJ522oo50wjiodOE8rILlpn By3clEKAoF3U+YxNMaudimf5a0ZQJpYX841hQ9URr6azNM6bB84N25A9pUAHBc0Bu8N/ b6csOR45UemvlDmB72i0cThwBZle53FkBMNCjz743ua8IUsfxYaISx9WeY3/GxqwA5NZ pUwA== MIME-Version: 1.0 X-Received: by 10.152.179.139 with SMTP id dg11mr22512627lac.28.1427569149130; Sat, 28 Mar 2015 11:59:09 -0700 (PDT) Sender: davide.italiano@gmail.com Received: by 10.25.66.3 with HTTP; Sat, 28 Mar 2015 11:59:09 -0700 (PDT) In-Reply-To: <201503281250.t2SCoOkt020297@svn.freebsd.org> References: <201503281250.t2SCoOkt020297@svn.freebsd.org> Date: Sat, 28 Mar 2015 11:59:09 -0700 X-Google-Sender-Auth: vLAy_MdoO7_bCV_zgzdiPIH9-z0 Message-ID: Subject: Re: svn commit: r280785 - in head/sys: kern netgraph/atm/sscop netgraph/atm/uni sys From: Davide Italiano To: Randall Stewart Content-Type: text/plain; charset=UTF-8 Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Mar 2015 18:59:12 -0000 On Sat, Mar 28, 2015 at 5:50 AM, 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). > 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