From nobody Wed Jun 10 21:19:46 2026 X-Original-To: dev-commits-src-main@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 4gbJZc3pwrz6hFj1 for ; Wed, 10 Jun 2026 21:19:52 +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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gbJZc0Zh2z3QBb for ; Wed, 10 Jun 2026 21:19:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1781126392; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UOjFjWa6WMEdrBKQeMGzkCzsPBv46An2HwO+jY/8qtg=; b=FauMCc/hmhFfsfNKjSAn/8XJLETzvmuUoPJmhwYskijvv5dMeEm9qEI6h/jHR1SD6aCR6x e92ztknrjalaUqq99PYOOCvGnnkPpXBbtrZEWBXCEUfSrxnMkTmmAfGSKBxBNC99QntB1i z7nLkrJ0cfpFav0K3QPZxhNqKuIq8UOjggJLLTPoanhI03WipS6RZdf4wRD4T3QsUGIlh4 0ojJiv3KdU1bpaOiV0I06LkYFZRkkcx4/eSNENKbIfrpIVdi32nuQCj3dr2ToR0AX8Upq2 qm87PXySQmyVqBELFYH34yaTNIwcdAO1Ta5NBF/OA7SLgJe3c24wcSSlYJ4/Fw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1781126392; a=rsa-sha256; cv=none; b=ZTHKvCyGZQO23q8XyoEhtD+o/3rMl0HjhBPHolDzk07HwyobNez5W9tukCHLmlMj3FUQBC X73g/pL1TAfbv4u7pMmWXdvPemBd7c8aIBQpieznkV1olai6v8ucEeL9vmD5xg4ZCHyGxL nnXKYcGYnuj4mLd1vSFOMuMQVLD8fLtEz+KzlRSKbjzX/+MNb3wE+fc4otxF5cTmJtmCXf 60g1f179HrG6dbeQspuIw8+bm3ltf7kXLEMNbaghOOZHJmngpEpwHIkyzBsUCaQPydgENJ 0Yn3P0zPwYx0wcuEB+YgbKjFeiq/2JqylzAKA8N11VeayPhAhk0r01pWgiEDTw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1781126392; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UOjFjWa6WMEdrBKQeMGzkCzsPBv46An2HwO+jY/8qtg=; b=tfG0HF7lCpLAX9zhx1u0mYYZqtvstWZMtWQlBbC3aJxFlpUp0wIFkf8lmpE5NSyJPaQLSI PmUsJpXZFCv8h/kmNtPYKg891zBxaN/PyxC9t6Rpx+BCITxAF/x5RZySOflLO3vKNnGLdH ceMTAM5pWa6Zjf97c//RVULxphXGMfCV4e/WwvD1uKGM3HoOvthywOKJh97p96fajNR38w I0F8K2M4Ph6BuPnuqLxywyHtlnN+f6fZ4/Bcl4dJyTj7JNdkds1E1esUH729BVHLIORzUv ypjN9Emd3CwqCtL351eUljzbR2SI3Ec+9jxEjW1aGRlbGrY9DNTAo5ukYSoKPA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gbJZb6Hcjz699 for ; Wed, 10 Jun 2026 21:19:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 24b3b by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 10 Jun 2026 21:19:46 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: Mark Ranger From: Ryan Libby Subject: git: 331613ddd8a5 - main - Pause failpoint: replace mtx_sleep with tsleep List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rlibby X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 331613ddd8a516e8eaf841f293754fa47cb339aa Auto-Submitted: auto-generated Date: Wed, 10 Jun 2026 21:19:46 +0000 Message-Id: <6a29d4f2.24b3b.30b48d62@gitrepo.freebsd.org> The branch main has been updated by rlibby: URL: https://cgit.FreeBSD.org/src/commit/?id=331613ddd8a516e8eaf841f293754fa47cb339aa commit 331613ddd8a516e8eaf841f293754fa47cb339aa Author: Mark Ranger AuthorDate: 2026-05-25 22:32:50 +0000 Commit: Ryan Libby CommitDate: 2026-06-10 21:13:05 +0000 Pause failpoint: replace mtx_sleep with tsleep Eliminate panic when re-setting a paused failpoint to pause (address of feq_mtx changes whilst in mtx_sleep, triggering assertion when reacquiring mtx). Reviewed by: rlibby Pull Request: https://github.com/freebsd/freebsd-src/pull/2267 --- sys/kern/kern_fail.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/sys/kern/kern_fail.c b/sys/kern/kern_fail.c index 11871dfb0dca..40b02040a504 100644 --- a/sys/kern/kern_fail.c +++ b/sys/kern/kern_fail.c @@ -176,7 +176,6 @@ struct fail_point_setting { STAILQ_ENTRY(fail_point_setting) fs_garbage_link; struct fail_point_entry_queue fp_entry_queue; struct fail_point * fs_parent; - struct mtx feq_mtx; /* Gives fail_point_pause something to do. */ }; /** @@ -248,7 +247,6 @@ fail_point_setting_new(struct fail_point *fp) fs_new = fs_malloc(); fs_new->fs_parent = fp; TAILQ_INIT(&fs_new->fp_entry_queue); - mtx_init(&fs_new->feq_mtx, "fail point entries", NULL, MTX_SPIN); fail_point_setting_garbage_append(fs_new); @@ -407,14 +405,13 @@ fail_point_drain(struct fail_point *fp, int expected_ref) } static inline void -fail_point_pause(struct fail_point *fp, enum fail_point_return_code *pret, - struct mtx *mtx_sleep) +fail_point_pause(struct fail_point *fp, enum fail_point_return_code *pret) { if (fp->fp_pre_sleep_fn) fp->fp_pre_sleep_fn(fp->fp_pre_sleep_arg); - msleep_spin(FP_PAUSE_CHANNEL(fp), mtx_sleep, "failpt", 0); + tsleep(FP_PAUSE_CHANNEL(fp), 0, "failpt", 0); if (fp->fp_post_sleep_fn) fp->fp_post_sleep_fn(fp->fp_post_sleep_arg); @@ -624,9 +621,7 @@ fail_point_eval_nontrivial(struct fail_point *fp, int *return_value) * The sysctl layer actually truncates all entries after * a pause for this reason. */ - mtx_lock_spin(&fp_setting->feq_mtx); - fail_point_pause(fp, &ret, &fp_setting->feq_mtx); - mtx_unlock_spin(&fp_setting->feq_mtx); + fail_point_pause(fp, &ret); break; case FAIL_POINT_YIELD: