Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp404824pxb; Wed, 3 Mar 2021 06:20:02 -0800 (PST) X-Google-Smtp-Source: ABdhPJyWTGvPbFsa5Nn7wymUHQO53frpNPRYvYqMiWI2gsr7snCMw8QUUj0p05A9PFUGbnlS/1vx X-Received: by 2002:a05:6402:512:: with SMTP id m18mr25168754edv.372.1614781202361; Wed, 03 Mar 2021 06:20:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614781202; cv=none; d=google.com; s=arc-20160816; b=ZKOPgVf9D2xho3Wgy5he2sQRN9xywKa5+s5orMVB8MS2zGNrnBJYttEm66Od2nUUKs 8nIq1IDJK7DwDdhkpN/NTnwqOKF1IqH1K7C/n5/gtE6Av3uOYfypK8a9R8OO9N3DjMyG eMTSA/YuNfk+4mEiwgZDSe7CeI3mR6GjjO1ajQS5Hz8JCpnFUSRu5lLmGPVfHVVwKfrj n7Soccsnws5kcyXYZ/Vhka30KK1v9A3t+AAWKy3V+dpeLvJ80Xf2iLQckujV1SZqCeMs 1SAy8/LzquIxJePdhqSp6aoQmbUp7zN9S7z/5BYgMXOahljnzp2/s3LxQDE0p5G7O/zh 0mfA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=+dI2ks8mCVUsUun9/2+5YlkQwdLkhfF/6YjiXn0J/Og=; b=V9sqTdoSZRWPx5gnvnlXUVq9l97kZcAY6qaF01tHL7EfjPWAVOECaJr1QbXCfoD+41 CvBM2GMBwxatb+rn0ENTmTotGj5bXOwX4j2rg+vyA1s4uNIkuUFR908hrt940o6IkXo+ PsFUKj+2GZ4jkjapsqUtwKBnVl3tzbZyHzelHri5yAnZXbVdkSr5kz2tudVhVx3+xmxB jrTITfOwSYZKaiFOM+0cGkwAmDE8NaAHVNkY+ueFGxDx6L2XdJXuXdiULeWvFes3FeqO R0MwQE5ezn2QBOQsV/uWz/lmRwv5boIXtPgrWOG/LgLMx2JiVDTwVGhiQt0Uq/byz9h+ fTCg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=1VLKZPzc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i12si14703344edk.461.2021.03.03.06.19.34; Wed, 03 Mar 2021 06:20:02 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=1VLKZPzc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244089AbhCAVDY (ORCPT + 99 others); Mon, 1 Mar 2021 16:03:24 -0500 Received: from mail.kernel.org ([198.145.29.99]:46316 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237561AbhCARMR (ORCPT ); Mon, 1 Mar 2021 12:12:17 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id D770664EE8; Mon, 1 Mar 2021 16:43:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1614617020; bh=eLHjXKOoR57muTxYafgvzISGl0UuljIk7HMuCALKpb4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=1VLKZPzc/ZBvUvXv9BUDv5iagn+3R1tuF9WoCgqPx8ugvPGd1Hi94iqpYDK2KCDSN BnddrRwqDTtTOS6J0UEPcuuzEYw0mVowiYap+y2Lf3VwYMsfVK3X3d09vCUNz2EuVA pRJo5PiqpKs+3vVYLtPna7hf4ZPgYcKsL/Q2DEeo= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Vishnu Dasa , Jorgen Hansen , Sasha Levin Subject: [PATCH 4.19 157/247] VMCI: Use set_page_dirty_lock() when unregistering guest memory Date: Mon, 1 Mar 2021 17:12:57 +0100 Message-Id: <20210301161039.356313534@linuxfoundation.org> X-Mailer: git-send-email 2.30.1 In-Reply-To: <20210301161031.684018251@linuxfoundation.org> References: <20210301161031.684018251@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Jorgen Hansen [ Upstream commit 5a16c535409f8dcb7568e20737309e3027ae3e49 ] When the VMCI host support releases guest memory in the case where the VM was killed, the pinned guest pages aren't locked. Use set_page_dirty_lock() instead of set_page_dirty(). Testing done: Killed VM while having an active VMCI based vSocket connection and observed warning from ext4. With this fix, no warning was observed. Ran various vSocket tests without issues. Fixes: 06164d2b72aa ("VMCI: queue pairs implementation.") Reviewed-by: Vishnu Dasa Signed-off-by: Jorgen Hansen Link: https://lore.kernel.org/r/1611160360-30299-1-git-send-email-jhansen@vmware.com Signed-off-by: Greg Kroah-Hartman Signed-off-by: Sasha Levin --- drivers/misc/vmw_vmci/vmci_queue_pair.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/misc/vmw_vmci/vmci_queue_pair.c b/drivers/misc/vmw_vmci/vmci_queue_pair.c index 5e0d1ac67f73f..36025e1058169 100644 --- a/drivers/misc/vmw_vmci/vmci_queue_pair.c +++ b/drivers/misc/vmw_vmci/vmci_queue_pair.c @@ -645,7 +645,7 @@ static void qp_release_pages(struct page **pages, for (i = 0; i < num_pages; i++) { if (dirty) - set_page_dirty(pages[i]); + set_page_dirty_lock(pages[i]); put_page(pages[i]); pages[i] = NULL; -- 2.27.0