Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp2075250ybp; Thu, 10 Oct 2019 01:44:24 -0700 (PDT) X-Google-Smtp-Source: APXvYqwIPnH62Gs4lvxG4liFqTYPy014b/vsBMouoF60zgBdLEVDtVkl9s9FHm2jMCJEmr55BNcp X-Received: by 2002:a17:906:448e:: with SMTP id y14mr7116862ejo.136.1570697064443; Thu, 10 Oct 2019 01:44:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570697064; cv=none; d=google.com; s=arc-20160816; b=dFmqYOdPWVgkI1QJcbh+quFRtw6G3ubbTRkaW2wWoIaGdhzr7AgYd7cJuQ0hBXOcX2 pRFp540S7szO63z/zWGMabYk0hlOzD1nvoc7X52hhOe+gGva2w3zxbdiZJ1XUQrPg/Ia N/g6h2D5214regvjiPB8Wk3xVXBbWwJy1O3cfYklu+IM0UbmU2HiM+OyKHvPDOVYPjSI schA2Mowc6iwC0dtnOPAZiOnURmIuErTVYMwnZtC5702dC04ogHj/e63oMKOmKrsQ6dH 3HRCb21lY1viqIYGo101MFr9934Zv8oqCWl7WHaqud4Q/4gdbgc6EIeAmw94U5Opzcmh 9Qhg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=1YpBUWzuYPfwTp2Zwe0WV9Ypy+8I7+CCY0XSsEzEzIo=; b=wMtKp1uWAeA2a3L9ucYq/P2WUTtUUUJTzcnRYM5F0O9mzwOfyO2ld2CxV4FT/LCLkr SMtcx//lUAzJ2ihNxxsI0bPMZfu31VE7X8JFLYcm7TRf5P3ZnTYEtEuLV2uJ1zkvT+6X aOe+gaFdGmV8Uc2MEbXgPsQM9BuzOlHC+M+9wk61XmgjBvt7/0rhI1Et4c3OQayUoNwj gYLohaWQi3UF5nOtu+93ghnLhMs9K19t7dcA8XeDDZyc3d5aLFKwJwzRajFEwSw1KsXJ ejPqIBgiem8zg3fM53bSAvseDGiGUFpJ9s3Iog3yyk9nW0yarchAJiDketk6v99FjjfU 5N9w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=b6X7MUIu; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b31si3581731ede.12.2019.10.10.01.44.01; Thu, 10 Oct 2019 01:44:24 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=b6X7MUIu; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388545AbfJJImZ (ORCPT + 99 others); Thu, 10 Oct 2019 04:42:25 -0400 Received: from mail.kernel.org ([198.145.29.99]:46942 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388540AbfJJImW (ORCPT ); Thu, 10 Oct 2019 04:42:22 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 9150F2054F; Thu, 10 Oct 2019 08:42:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1570696942; bh=wD994kTRdn4+4NVQk6oHG8B0XzrmSLQfF/qLv50TiRQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=b6X7MUIu4TqJ7L1ZRt3A6iLXdbQNXy4Iu2golCDBEU8TP4zyD1GSM5a93nWekGmOD UHIQbgy36qr8UoxhwXsNXuueeCbd8we8nkuZ4ioo8ADhjkIbIEDUe57B7udoHHFzds NdFt4lsqfVt7yB8cB3lx1xrePaFH5OmLVlCBoYU0= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= , Boris Ostrovsky , Juergen Gross , Stefano Stabellini , David Hildenbrand Subject: [PATCH 5.3 082/148] xen/balloon: Set pages PageOffline() in balloon_add_region() Date: Thu, 10 Oct 2019 10:35:43 +0200 Message-Id: <20191010083616.308363319@linuxfoundation.org> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191010083609.660878383@linuxfoundation.org> References: <20191010083609.660878383@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: David Hildenbrand commit c5ad81eb029570c5ca5859539b0679f07a776d25 upstream. 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)) ------------[ cut here ]------------ kernel BUG at include/linux/page-flags.h:744! invalid opcode: 0000 [#1] SMP NOPTI Reported-by: Marek Marczykowski-Górecki Tested-by: Marek Marczykowski-Górecki 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 Reviewed-by: Boris Ostrovsky Signed-off-by: Boris Ostrovsky Signed-off-by: Greg Kroah-Hartman --- drivers/xen/balloon.c | 1 + 1 file changed, 1 insertion(+) --- a/drivers/xen/balloon.c +++ b/drivers/xen/balloon.c @@ -688,6 +688,7 @@ static void __init balloon_add_region(un /* totalram_pages and totalhigh_pages do not include the boot-time balloon extension, so don't subtract from it. */ + __SetPageOffline(page); __balloon_append(page); }