From owner-svn-src-all@freebsd.org Sat Sep 3 18:43:15 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F1AEBBCE6FF; Sat, 3 Sep 2016 18:43:15 +0000 (UTC) (envelope-from gonzo@id.bluezbox.com) Received: from id.bluezbox.com (id.bluezbox.com [45.55.20.155]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CE2C1F15; Sat, 3 Sep 2016 18:43:15 +0000 (UTC) (envelope-from gonzo@id.bluezbox.com) Received: from [136.179.10.143] (helo=[10.140.230.85]) by id.bluezbox.com with esmtpsa (TLSv1:ECDHE-RSA-AES256-SHA:256) (Exim 4.86_2 (FreeBSD)) (envelope-from ) id 1bgFuF-000NHP-De; Sat, 03 Sep 2016 11:43:07 -0700 Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Subject: Re: svn commit: r305308 - stable/11/sys/arm/ti From: Oleksandr Tymoshenko In-Reply-To: <20160903084418.GU83214@kib.kiev.ua> Date: Sat, 3 Sep 2016 11:42:37 -0700 Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: <40BCE21A-2FB8-44FD-8C2C-0579D8C0E57F@freebsd.org> References: <201609022204.u82M4KOm025953@repo.freebsd.org> <20160903084418.GU83214@kib.kiev.ua> To: Konstantin Belousov X-Mailer: Apple Mail (2.3124) Sender: gonzo@id.bluezbox.com X-Spam-Level: -- X-Spam-Report: Spam detection software, running on the system "id.bluezbox.com", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see The administrator of that system for details. Content preview: > On Sep 3, 2016, at 1:44 AM, Konstantin Belousov wrote: > > On Fri, Sep 02, 2016 at 10:04:20PM +0000, Oleksandr Tymoshenko wrote: >> Author: gonzo >> Date: Fri Sep 2 22:04:20 2016 >> New Revision: 305308 >> URL: https://svnweb.freebsd.org/changeset/base/305308 >> >> Log: >> MFC r305039: >> >> Fix TI PRUSS driver panic with INVARIANTS enabled >> >> Value passed as islocked argument to knlist_add should >> be consistent with actual lock state so add lock/unlock >> calls around knlist_add >> >> PR: 212120 >> Submitted by: Manuel Stuhn >> >> Modified: >> stable/11/sys/arm/ti/ti_pruss.c >> Directory Properties: >> stable/11/ (props changed) >> >> Modified: stable/11/sys/arm/ti/ti_pruss.c >> ============================================================================== >> --- stable/11/sys/arm/ti/ti_pruss.c Fri Sep 2 21:35:32 2016 (r305307) >> +++ stable/11/sys/arm/ti/ti_pruss.c Fri Sep 2 22:04:20 2016 (r305308) >> @@ -310,7 +310,9 @@ ti_pruss_kqfilter(struct cdev *cdev, str >> case EVFILT_READ: >> kn->kn_hook = sc; >> kn->kn_fop = &ti_pruss_kq_read; >> + mtx_lock(&sc->sc_mtx); >> knlist_add(&sc->sc_selinfo.si_note, kn, 1); >> + mtx_unlock(&sc->sc_mtx); >> break; >> default: >> return (EINVAL); > Wouldn't it be less code to just change the arg to indicate 'unlocked’ ? [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP 0.0 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 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, 03 Sep 2016 18:43:16 -0000 > On Sep 3, 2016, at 1:44 AM, Konstantin Belousov = wrote: >=20 > On Fri, Sep 02, 2016 at 10:04:20PM +0000, Oleksandr Tymoshenko wrote: >> Author: gonzo >> Date: Fri Sep 2 22:04:20 2016 >> New Revision: 305308 >> URL: https://svnweb.freebsd.org/changeset/base/305308 >>=20 >> Log: >> MFC r305039: >>=20 >> Fix TI PRUSS driver panic with INVARIANTS enabled >>=20 >> Value passed as islocked argument to knlist_add should >> be consistent with actual lock state so add lock/unlock >> calls around knlist_add >>=20 >> PR: 212120 >> Submitted by: Manuel Stuhn >>=20 >> Modified: >> stable/11/sys/arm/ti/ti_pruss.c >> Directory Properties: >> stable/11/ (props changed) >>=20 >> Modified: stable/11/sys/arm/ti/ti_pruss.c >> = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D >> --- stable/11/sys/arm/ti/ti_pruss.c Fri Sep 2 21:35:32 2016 = (r305307) >> +++ stable/11/sys/arm/ti/ti_pruss.c Fri Sep 2 22:04:20 2016 = (r305308) >> @@ -310,7 +310,9 @@ ti_pruss_kqfilter(struct cdev *cdev, str >> case EVFILT_READ: >> kn->kn_hook =3D sc; >> kn->kn_fop =3D &ti_pruss_kq_read; >> + mtx_lock(&sc->sc_mtx); >> knlist_add(&sc->sc_selinfo.si_note, kn, 1); >> + mtx_unlock(&sc->sc_mtx); >> break; >> default: >> return (EINVAL); > Wouldn't it be less code to just change the arg to indicate = 'unlocked=E2=80=99 ? It would. I=E2=80=99ll update HEAD and stable/11 soon. Thanks for = spotting.=20