From nobody Mon Oct 2 11:51:16 2023 X-Original-To: bugs@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 4RzfRm3YV6z4w0T3 for ; Mon, 2 Oct 2023 11:51:16 +0000 (UTC) (envelope-from bugzilla-noreply@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 4RzfRm2XSyz3Hwn for ; Mon, 2 Oct 2023 11:51:16 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696247476; a=rsa-sha256; cv=none; b=maAGuN4xBUE8udsuto2e47hrHhfU99ulCBvsVQ/OoDX2WLeSGm/9OEGh1fnSuBtb27a4Cv nPazgvym1Stdf7QxiTzc37MPIzFQLSf2rKZf7+RzTn1UQ6q7K/ngEwkQw4f1S6UTotpFOB k7p/AmZSNlPPTc+MPW6InvLGeXo/wiDXsaJzOFbfbyDzgVxp/1n2NRwYMIRz+JrHGB5Shb RfwOVGRvuY5hSNyoVOWIB8FmxYXiW8EO5H8c8Rxh7kckgLKywZUuGkCwWHwRwoIumjnVnU J/pHLmGjA2X6pdX8DP7bTvStIg2WcURp9xdCpbsTkG5uxWdg25P0lEhk4A5a0A== 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=1696247476; 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: in-reply-to:in-reply-to:references:references; bh=pSmhemCystXsqXsC6s6QgjL/nN/j1zHmLCmf4rv9h1Y=; b=KPtvWmUqBZg5kwjl1QJjdAvYPofeu6tSgjzcxO90/YPPJhJYGxT8/+HkvxF9g/IV8zZyQl J5e7NUf4r6RnHZ4JnesWvS6upXKbSWVjMqg6X/qDE81zh40Fbni/GP1MSv6Q2Bl+TvXXx8 Bl/NSIKzyQKigXCM0tYF1Xzi1XKVMlVwmqGA5WVivXf37AygpAHByA3dSIsmAXaJe9stl/ JmRyiKClj6nhksJHwznDIeCWNkTfXkPhHI1MrL2yREav5d2qgsdn0N2LreuqHcvPWEs2ir GEuaOwd7IwJf93kwKgO/xXscgXOu6kbrmf8rTQViiBpMr43tVrV/uOVIKzlUCw== Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (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 4RzfRm1WCkz19Bw for ; Mon, 2 Oct 2023 11:51:16 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 392BpGm8040568 for ; Mon, 2 Oct 2023 11:51:16 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from bugzilla@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 392BpGl6040567 for bugs@FreeBSD.org; Mon, 2 Oct 2023 11:51:16 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: bugzilla set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 273610] Panic (vm_page_assert_xbusied: page 0xfffffe0001beaed8 busy_lock 0xfffffffe not owned by me) Date: Mon, 02 Oct 2023 11:51:16 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 15.0-CURRENT X-Bugzilla-Keywords: crash X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: commit-hook@FreeBSD.org X-Bugzilla-Status: Open X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Bug reports List-Archive: https://lists.freebsd.org/archives/freebsd-bugs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-bugs@freebsd.org MIME-Version: 1.0 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D273610 --- Comment #7 from commit-hook@FreeBSD.org --- A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=3De61568aeeec7667789e6c9d4837e074ed= ecc990e commit e61568aeeec7667789e6c9d4837e074edecc990e Author: Mark Johnston AuthorDate: 2023-10-02 11:49:27 +0000 Commit: Mark Johnston CommitDate: 2023-10-02 11:49:52 +0000 swap_pager: Fix a race in swap_pager_swapoff_object() When we disable swapping to a device, we scan the full VM object list looking for objects with swap trie nodes that reference the device in question. The pages corresponding to those nodes are paged in. While paging in, we drop the VM object lock. Moreover, we do not hold a reference for the object; swap_pager_swapoff_object() merely bumps the paging-in-progress counter. vm_object_terminate() waits for this counter to drain before proceeding and freeing pages. However, swap_pager_swapoff_object() decrements the counter before re-acquiring the VM object lock, which means that vm_object_terminate() can race to acquire the lock and free the pages. Then, swap_pager_swapoff_object() ends up unbusying a freed page. Fix the problem by acquiring the lock before waking up sleepers. PR: 273610 Reported by: Graham Perrin Reviewed by: kib MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D42029 sys/vm/swap_pager.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --=20 You are receiving this mail because: You are the assignee for the bug.=