From nobody Wed Apr 27 12:50:27 2022 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 8E2CF1AAA991; Wed, 27 Apr 2022 12:50:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4KpJWR323Zz4dXF; Wed, 27 Apr 2022 12:50:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1651063827; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tKi9hGVyFLq07yhsjsVYb1Vj2gfDUi3n8j2ZlLio4l8=; b=TKEjlrjz70W4X89USsOGQ1aICzKfHVBGqWMAM9h9aq8GN9XPZoCXzCV1+fhQvuuTljYRfC xLcN2bZ6aYzYwbTh6A8TpgdWCgQD9NSS5j7pNx3JBNJAcjVsUTtWPHgUglNG4hYeQ1Xw1X OO5LS4ooKjOFgf0c8GLWxZmPSxK3xXUCcDyPoq1t0wF5YauI2ImkrzVHATvWbn+mBUEtF/ Hwhh++Fz6sGbx8vPjFjAFRPF5BxLrUOq4NYmu8sa4xN17QAqCnIQHwRTKXp6GawZF9uPr1 pR7oL9yuHl2ja2/hGFMpNz52oZYKTn+v/fgyKl6W0JebFVcYP8WEJOZ+ty+RJg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 37E97241B5; Wed, 27 Apr 2022 12:50:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 23RCoRYu011556; Wed, 27 Apr 2022 12:50:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 23RCoRIA011555; Wed, 27 Apr 2022 12:50:27 GMT (envelope-from git) Date: Wed, 27 Apr 2022 12:50:27 GMT Message-Id: <202204271250.23RCoRIA011555@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kristof Provost Subject: git: 7dc9b36d44b0 - stable/13 - callout: fix using shared rmlocks List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 7dc9b36d44b0bf5e9fc3edace6f769d0d61c3c0e Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1651063827; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tKi9hGVyFLq07yhsjsVYb1Vj2gfDUi3n8j2ZlLio4l8=; b=w9clskWniE05yyXSeQ9bkPAwcJiGrbXsjJhFCUO0oxEwSS5Oq6dX2XAwvTBZNyuB77LTVt yWLDLmgTdPqWVL6TtG8xRTFmuod29Up6XwbOwNjC9KVT5zy+uiL2OCx8MxT2+2cql9OqkB SboWn1mTOHh22mTMpXBhg6+pqKKf1e4pMusyj34uDKhjHEFCq9Uy3ogY+GhvLppoCARiRm Dx6y5FTMp8wzeOu/qhYGdhNL+TAPrjLG29/o9T3Zu3v5A3ZCdRWmDUnGvLwUipcrioX3ZS DdsYaU2PpfxxG+a3mejEl2nYhv4sIdhsb3v7gI5zi9JMXtOhaLsJlwKzBhGnQQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1651063827; a=rsa-sha256; cv=none; b=hvYsvvLLNY+h5QntG4X4WT/XKcameE2XYUvwHlmGbIwCGO4UzMHLtLrJ+HN7eqNevzXwwK /CcqbJ/BGrCnE9u2CBLJO1epEclHTaEqyOPjS0GjT2z2Ey17bx205Rz162ee9NGq6E/nrO jpy1DcepApSRhYUfQdV6rLhkBV7UCLUawiAFTFRaRFehBTs2KuzZDI/HRRSDTmrE3MNQH5 sHjhWVd0HjJZvXrmabELsC+GWkcPDvtmx5rlMFoGEXZ9CZEOkQoIfMy2zx99yVtais6O9/ GiFHqIuy96RgEsDSnLgCybiaJ6dpd6L32USDaxWgoih7F2ONg1kao0oOlPNgzw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=7dc9b36d44b0bf5e9fc3edace6f769d0d61c3c0e commit 7dc9b36d44b0bf5e9fc3edace6f769d0d61c3c0e Author: Kristof Provost AuthorDate: 2022-04-19 15:01:25 +0000 Commit: Kristof Provost CommitDate: 2022-04-27 06:46:43 +0000 callout: fix using shared rmlocks 15b1eb142c changed the callout code to store the CALLOUT_SHAREDLOCK flag in c_iflags (where it used to be c_flags), but failed to update the check in softclock_call_cc(). This resulted in the callout code always taking the write lock, even if a read lock had been requested (with the CALLOUT_SHAREDLOCK flag in callout_init_rm()). Reviewed by: markj MFC after: 1 week Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D34959 (cherry picked from commit a879e40ca2a9e95b3e3dc4810127d3cf105ec0d3) --- sys/kern/kern_timeout.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/kern/kern_timeout.c b/sys/kern/kern_timeout.c index 98880524667e..85f342cdeb3b 100644 --- a/sys/kern/kern_timeout.c +++ b/sys/kern/kern_timeout.c @@ -635,7 +635,7 @@ softclock_call_cc(struct callout *c, struct callout_cpu *cc, ("softclock_call_cc: act %p %x", c, c->c_flags)); class = (c->c_lock != NULL) ? LOCK_CLASS(c->c_lock) : NULL; lock_status = 0; - if (c->c_flags & CALLOUT_SHAREDLOCK) { + if (c->c_iflags & CALLOUT_SHAREDLOCK) { if (class == &lock_class_rm) lock_status = (uintptr_t)&tracker; else