From owner-svn-src-head@freebsd.org Tue Feb 4 21:08:13 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D988F234814; Tue, 4 Feb 2020 21:08:13 +0000 (UTC) (envelope-from chagin.dmitry@gmail.com) Received: from mail-io1-f45.google.com (mail-io1-f45.google.com [209.85.166.45]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48By315Sg4z4YZV; Tue, 4 Feb 2020 21:08:13 +0000 (UTC) (envelope-from chagin.dmitry@gmail.com) Received: by mail-io1-f45.google.com with SMTP id i11so22542535ioi.12; Tue, 04 Feb 2020 13:08:13 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=lh+2iC79+DM+jYoV3oaDUI3hLJO0gQnNqbKZtO8kTP0=; b=breWKxf5X3lXkuVV6uvnee6BtrLdPThkPM6/jPhJqaZ06WrFLpU//FpEsyV6jrgSt1 6DYNy51Zi8T7zYYlc8xBtwhGscQjo4GFGpW8dHVV4Yi8iDeuaM1jJr3p81vdzanaaIE4 Q9acMEl+YCfYvXvXhNiK3rlq/Jm301Nk+peYdbHJtUgxrY4i+X8yKdZ03Oxr4hcnaE/G 6RmTA9tSt9lCNCzHL2tLptUQ7e1ZLyg8B9rTQe5tsZ22mT+qYA3V0KlAXNIVwOuVGkYZ sF6XaAdBu14FmnyV4wsNbnSdLIkNNsJOz6JsJrZGodLkHJ8SE4z14ZcFMgnlpR/41tog z5AA== X-Gm-Message-State: APjAAAWVeR+ZRWdUNM/pbRR3mAj9Pzbd+UxenBiX6nVlmD9JUlRLA8et 8i3XEGbr5QHy8y68oi+RufYKw0/3+xWKpBDcCI986sJg X-Google-Smtp-Source: APXvYqwPLMWQTHEgKnvesK3CTWq3peqkYP9yEaRFnUcpfOljDDNQNJM/ISaqfEW6S09KBnP3Y1qiu3mz+7x44ksGtTQ= X-Received: by 2002:a6b:6e05:: with SMTP id d5mr23886383ioh.90.1580850492407; Tue, 04 Feb 2020 13:08:12 -0800 (PST) MIME-Version: 1.0 References: <202002042102.014L28em011948@repo.freebsd.org> In-Reply-To: <202002042102.014L28em011948@repo.freebsd.org> From: Dmitry Chagin Date: Wed, 5 Feb 2020 00:08:01 +0300 Message-ID: Subject: Re: svn commit: r357530 - head/sys/kern To: Konstantin Belousov Cc: src-committers , svn-src-all , svn-src-head X-Rspamd-Queue-Id: 48By315Sg4z4YZV X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-6.00 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; REPLY(-4.00)[]; TAGGED_FROM(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Feb 2020 21:08:13 -0000 =D1=81=D1=80, 5 =D1=84=D0=B5=D0=B2=D1=80. 2020 =D0=B3. =D0=B2 00:02, Konsta= ntin Belousov : > Author: kib > Date: Tue Feb 4 21:02:08 2020 > New Revision: 357530 > URL: https://svnweb.freebsd.org/changeset/base/357530 > > Log: > Remove unneeded assert for curproc. Simplify. > > Reported by: syzkaller by markj > Sponsored by: The FreeBSD Foundation > > Modified: > head/sys/kern/kern_time.c > > Modified: head/sys/kern/kern_time.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 > --- head/sys/kern/kern_time.c Tue Feb 4 20:40:45 2020 (r357529) > +++ head/sys/kern/kern_time.c Tue Feb 4 21:02:08 2020 (r357530) > @@ -254,11 +254,8 @@ void > kern_thread_cputime(struct thread *targettd, struct timespec *ats) > { > uint64_t runtime, curtime, switchtime; > - struct proc *p; > > if (targettd =3D=3D NULL) { /* current thread */ > - p =3D curthread->td_proc; > - PROC_LOCK_ASSERT(p, MA_OWNED); > critical_enter(); > switchtime =3D PCPU_GET(switchtime); > curtime =3D cpu_ticks(); > @@ -266,8 +263,7 @@ kern_thread_cputime(struct thread *targettd, struct t= i > critical_exit(); > runtime +=3D curtime - switchtime; > } else { > - p =3D targettd->td_proc; > - PROC_LOCK_ASSERT(p, MA_OWNED); > + PROC_LOCK_ASSERT(targettd->td_proc, MA_OWNED); > thread_lock(targettd); > runtime =3D targettd->td_runtime; > thread_unlock(targettd); > 10x