Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp2366211imm; Mon, 28 May 2018 06:49:53 -0700 (PDT) X-Google-Smtp-Source: AB8JxZpeJIbrvvn3M5UvWxKoAx5cn4CfIbGXQ3Trjrjj34CBcbqWL1wolHbBKxR2NVl89ugZXrVZ X-Received: by 2002:a17:902:bd95:: with SMTP id q21-v6mr10687251pls.237.1527515393575; Mon, 28 May 2018 06:49:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527515393; cv=none; d=google.com; s=arc-20160816; b=y2ftNhiGckBAraXLhckoDS7zXVOMyAIYMAGHlaleQTP7v9WLVOgIHgSDEbKn5aTUEp UR7DjhxmI9tuaFhREJOA5sxENe01Xbt5sMztNJUsSNj91LKByPQUPAEVqwYqnUQ2i3rY gRizQAZvNdyeMpcR/54Ex5RBwohqhBv2K4WitQMAWqoLqBOzwJJFAAcbbi+n+KVp3spI sVEygHLrmnbHRWCmW/Z9COmvGF9VypO3rvH5r2fpnBnJYpPGZeeACX34CMeekV56hpe/ 3CmZGZBnVgfw6GaBKukE3CVfXeWYIrcCRr7JBkJk5Vwr4DWgZwty48AXj2d8f5ivKXJB H1hw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=cCRVjBQkGN8Rm3RUSH/86AO3vxlrL74N9tg3LwNRh8Y=; b=Fxuq4RPjliECYOJlNg9+2qgI4McEKgN1xpUNqrlpPqAaJBN2taFdu7zBka5mVepa+j RG4wZOrbYoHZEWcTzy1r9pI4hqvSvMBDoR0znQfdqVay0dJpEYYgyZxXiTs8N1j8aOtl VXM+MF8CBMxB+tkOzphR5McDcpUnhaJSIu17h+f+p8qgoZqvXOVIh45DtDxipIRKaBje g4Kc0/IgxORWBT96HEEJSE0u8fxbiGHZ8+1i6ybYkZw1L8NG+jrtbhP4W2DBrzyDr4Zr iSGYx72a5oCLbSzy4bVIUjxHb6o3ke5Kn8T8htQYKkWCObsdq6RBEtUb47L3ABhrIpgT M8Fg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=UcC/QsDY; 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 r8-v6si12084376plj.40.2018.05.28.06.49.38; Mon, 28 May 2018 06:49:53 -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=UcC/QsDY; 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 S937455AbeE1KmU (ORCPT + 99 others); Mon, 28 May 2018 06:42:20 -0400 Received: from mail.kernel.org ([198.145.29.99]:33588 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S937426AbeE1KmP (ORCPT ); Mon, 28 May 2018 06:42:15 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) (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 ADE74208A3; Mon, 28 May 2018 10:42:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1527504135; bh=l92Hknu5MNL/yD41MDAeKVoURJEn1IzLAkfmclRILDo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=UcC/QsDY49Ov17wRA9uwWQYdi9wYY2FMfqvGLpa7X24ChI9P0f5dqwRrrAJ3o3IS0 k7DI2POLCmce3cVxfbRfk+iWO90Q+ajWf0F+6fgpylWCQeHDkRnuceOA8Sj9z6XRK+ 2CImgwQYyfRMYiJK/vUFNtgA5tLFu5nB04fWNC5Q= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, David Hildenbrand , Andrey Ryabinin , Alexander Potapenko , Dmitry Vyukov , Andrew Morton , Linus Torvalds Subject: [PATCH 4.14 026/496] kasan: free allocated shadow memory on MEM_CANCEL_ONLINE Date: Mon, 28 May 2018 11:56:51 +0200 Message-Id: <20180528100320.692311717@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180528100319.498712256@linuxfoundation.org> References: <20180528100319.498712256@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.14-stable review patch. If anyone has any objections, please let me know. ------------------ From: David Hildenbrand commit ed1596f9ab958dd156a66c9ff1029d3761c1786a upstream. We have to free memory again when we cancel onlining, otherwise a later onlining attempt will fail. Link: http://lkml.kernel.org/r/20180522100756.18478-2-david@redhat.com Fixes: fa69b5989bb0 ("mm/kasan: add support for memory hotplug") Signed-off-by: David Hildenbrand Acked-by: Andrey Ryabinin Cc: Alexander Potapenko Cc: Dmitry Vyukov Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Signed-off-by: Greg Kroah-Hartman --- mm/kasan/kasan.c | 1 + 1 file changed, 1 insertion(+) --- a/mm/kasan/kasan.c +++ b/mm/kasan/kasan.c @@ -811,6 +811,7 @@ static int __meminit kasan_mem_notifier( kmemleak_ignore(ret); return NOTIFY_OK; } + case MEM_CANCEL_ONLINE: case MEM_OFFLINE: { struct vm_struct *vm;