From nobody Wed Mar 20 21:25:00 2024 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 4V0M7K0WFKz5F0JF; Wed, 20 Mar 2024 21:25:01 +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 4V0M7K054zz4X4K; Wed, 20 Mar 2024 21:25:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1710969901; 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=Hbn+HBvWso0QqEVbgIxu4cZddo7T4WlgCCHZZrj6seo=; b=ucmZKyhlHUR+Y7Um3WlUwnZbG0BsxscWAQ8jLwp+YtUHTRdgUc4q1irMDYLafLiMvosfji QKI4cn03VgBLQS23RbyZa7NZJDmF1n9fVb5xygBwctP20lq2+fljOgl82ce51iL55w30LP Ww76vmGWjHJ49kMPiEhlkJjMKIhVUyUDWEG1WEKZ4NxYuLSiUsryHPv08QLV4kg8f9l7lu Eeg2HSKNGEWxu+cBicSEsPuBIgwIexgkBYfUJTralVmuPWzx2UqHHrQ3vEaDjIa038Lt58 RWzWDlThJp6Yk4W8X5po1uMKSLHNUZia3Z2F3lnpCpTPAyvZtQFFVn7cEE+n6Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1710969901; a=rsa-sha256; cv=none; b=KIkjkg66BS4xvHZgIq+oAOD/ygXMRJFQHIH6/gVpw9D/FO1nsLmXQAt7E5G91nsiaLNXec absnMV/0nMZhY2SVFQ9z6cyR9BYec66SXnscUkhTllqhgEZPF8734vS/nWlgUlI5ZiCJTJ DnjWf5+19KfYuZHidHtG0S5BaKtbDt7Tv2WjCEfzlsrPz6Cjmq5L7XdHRpQCKUWAhWrho4 QJz7QcnBlJz+fTvgHOxKHVGv3JgDnFUxpHSFn6KUHd03RTmUO/e+tfJ/uUgpbVWFEpie8T jIu7eYf6+pOKfPlutZAJb38DweHf0zVamOjf5+if+IiF2cqach87w/C7UX6sXA== 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=1710969901; 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=Hbn+HBvWso0QqEVbgIxu4cZddo7T4WlgCCHZZrj6seo=; b=Sv6cp+4MDPTfzREeNktuYrTMCVLy1p7NqnZdw5HhgsmnHaf5IOOheenCkdgCyZO9qm3tcE GFpsclxqc/KyHGQ953qAIERfCaI2NfMC2CaqO8JeWu18EicRTeBj35TSXektDUEXvHI9YU g2/C02nMg+U37Eed/LO1kGQW4k8SIoBrQ1l5F++Fd5WZ6L3R43m4fkd05R56sTWEPK3jt+ Q3jX/ebtsPgemHXKzm5VzS1hIhF+MgcmLDnqBa67zC0QgJ0KLpsy+dIqO0fC2UDirL5nW9 UAz/827Hdp/RysoLeUYPJ68fImuCBKlRJbEImcEG/a8xkDmFo5Nh/AtcB49kbg== 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 4V0M7J6nglz16Vm; Wed, 20 Mar 2024 21:25:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 42KLP0CQ029917; Wed, 20 Mar 2024 21:25:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 42KLP0TO029914; Wed, 20 Mar 2024 21:25:00 GMT (envelope-from git) Date: Wed, 20 Mar 2024 21:25:00 GMT Message-Id: <202403202125.42KLP0TO029914@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Chuck Silvers Subject: git: 083608e4669e - stable/13 - UFS: panic rather than forcibly unmount the root fs 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: chs X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 083608e4669e0eb3d31d4e7d9ced00ae822807e6 Auto-Submitted: auto-generated The branch stable/13 has been updated by chs: URL: https://cgit.FreeBSD.org/src/commit/?id=083608e4669e0eb3d31d4e7d9ced00ae822807e6 commit 083608e4669e0eb3d31d4e7d9ced00ae822807e6 Author: Chuck Silvers AuthorDate: 2023-08-10 16:55:47 +0000 Commit: Chuck Silvers CommitDate: 2024-03-20 20:25:49 +0000 UFS: panic rather than forcibly unmount the root fs If the root fs is forcibly unmounted then basically every process will die with a SEGV as soon as it tries to run again because libc.so is gone, which leaves the system basically hung. It seems better to just panic instead, so let's do that. PR: 276944 Requested-by: karels Reviewed-by: imp, mckusick, karels Sponsored-by: Netflix Differential Revision: https://reviews.freebsd.org/D41387 (cherry picked from commit 60a41168d195cc09f7351c2c2bcafc389ed52406) --- sys/ufs/ffs/ffs_vfsops.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sys/ufs/ffs/ffs_vfsops.c b/sys/ufs/ffs/ffs_vfsops.c index a7c619fe98ef..433df476f563 100644 --- a/sys/ufs/ffs/ffs_vfsops.c +++ b/sys/ufs/ffs/ffs_vfsops.c @@ -324,6 +324,9 @@ ffs_fsfail_cleanup_locked(struct ufsmount *ump, int error) mtx_assert(UFS_MTX(ump), MA_OWNED); if (error == ENXIO && (ump->um_flags & UM_FSFAIL_CLEANUP) == 0) { ump->um_flags |= UM_FSFAIL_CLEANUP; + if (ump->um_mountp == rootvnode->v_mount) + panic("UFS: root fs would be forcibly unmounted"); + /* * Queue an async forced unmount. */