From nobody Tue Nov 11 06:52:40 2025 Delivered-To: importer@patchew.org Received-SPF: none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; spf=none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1569599264; cv=none; d=zoho.com; s=zohoarc; b=S9C9oEHOaBxwh+qZQdv6t/TuqXzeWllSop9+h+QKa/KzoI2bMuADMzBC30LGR5uj+L5u5UggkAC5zbT5bfJxmMjQ3nqmyaBOAwZRDRFdQeFGf+YVS95WHrMPEg8+MvoNyS//puQoayQoxQ0KkWmkhizl04RVfhUMTnE589PHNBI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1569599264; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To:ARC-Authentication-Results; bh=TLzvSE2scX66XF0w9K2oJlvEyeMjR4MrGp9LRoUUQ/I=; b=imJh3fZ4vE+fHVWy5+qv0draBYz6csMsXzdTiMtqXd0H8vz79Hk7IMrAbAj2z3hyCTHdzKuUwnVg4e5TClgidpI6xgB/wTEZKu8sAI8ii5B2QWr7z1ZezRxrQ8cT2FrzRHlId0OMrX85lb5I3s4Cbt0tyR0LVJo+g3pleINY0Nc= ARC-Authentication-Results: i=1; mx.zoho.com; spf=none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1569599264851922.3090394673211; Fri, 27 Sep 2019 08:47:44 -0700 (PDT) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1iDsS4-0006lr-8z; Fri, 27 Sep 2019 15:46:36 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1iDsS3-0006lm-7t for xen-devel@lists.xenproject.org; Fri, 27 Sep 2019 15:46:35 +0000 Received: from mx1.redhat.com (unknown [209.132.183.28]) by localhost (Halon) with ESMTPS id fbb55e90-e13d-11e9-967e-12813bfff9fa; Fri, 27 Sep 2019 15:46:34 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id EF3208980E5; Fri, 27 Sep 2019 15:46:33 +0000 (UTC) Received: from t460s.redhat.com (ovpn-116-169.ams2.redhat.com [10.36.116.169]) by smtp.corp.redhat.com (Postfix) with ESMTP id BBB3D60BF3; Fri, 27 Sep 2019 15:46:29 +0000 (UTC) X-Inumbo-ID: fbb55e90-e13d-11e9-967e-12813bfff9fa From: David Hildenbrand To: linux-kernel@vger.kernel.org Date: Fri, 27 Sep 2019 17:46:28 +0200 Message-Id: <20190927154628.8480-1-david@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.6.2 (mx1.redhat.com [10.5.110.67]); Fri, 27 Sep 2019 15:46:34 +0000 (UTC) Subject: [Xen-devel] [PATCH v1] xen/balloon: Set pages PageOffline() in balloon_add_region() X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Juergen Gross , Stefano Stabellini , David Hildenbrand , =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= , stable@vger.kernel.org, linux-mm@kvack.org, xen-devel@lists.xenproject.org, Boris Ostrovsky Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" We are missing a __SetPageOffline(), which is why we can get !PageOffline() pages onto the balloon list, where alloc_xenballooned_pages() will complain: page:ffffea0003e7ffc0 refcount:1 mapcount:0 mapping:0000000000000000 index:= 0x0 flags: 0xffffe00001000(reserved) raw: 000ffffe00001000 dead000000000100 dead000000000200 0000000000000000 raw: 0000000000000000 0000000000000000 00000001ffffffff 0000000000000000 page dumped because: VM_BUG_ON_PAGE(!PageOffline(page)) Reported-by: Marek Marczykowski-G=C3=B3recki Tested-by: Marek Marczykowski-G=C3=B3recki ------------[ cut here ]------------ kernel BUG at include/linux/page-flags.h:744! invalid opcode: 0000 [#1] SMP NOPTI Reported-by: Marek Marczykowski-G=C3=B3recki Tested-by: Marek Marczykowski-G=C3=B3recki Fixes: 77c4adf6a6df ("xen/balloon: mark inflated pages PG_offline") Cc: stable@vger.kernel.org # v5.1+ Cc: Boris Ostrovsky Cc: Juergen Gross Cc: Stefano Stabellini Signed-off-by: David Hildenbrand --- drivers/xen/balloon.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/xen/balloon.c b/drivers/xen/balloon.c index 05b1f7e948ef..29f6256363db 100644 --- a/drivers/xen/balloon.c +++ b/drivers/xen/balloon.c @@ -687,6 +687,7 @@ static void __init balloon_add_region(unsigned long sta= rt_pfn, /* totalram_pages and totalhigh_pages do not include the boot-time balloon extension, so don't subtract from it. */ + __SetPageOffline(page); __balloon_append(page); } =20 --=20 2.21.0 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel