Received: by 10.223.176.5 with SMTP id f5csp3173822wra; Thu, 1 Feb 2018 12:00:04 -0800 (PST) X-Google-Smtp-Source: AH8x225oXgs99odtoQjoGORNBVtWS1wtZH6LE2J47ZLZeXNTwMJ298LWbiHR15nAW29rRAiyctnV X-Received: by 2002:a17:902:c81:: with SMTP id 1-v6mr32991514plt.281.1517515204265; Thu, 01 Feb 2018 12:00:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517515204; cv=none; d=google.com; s=arc-20160816; b=l6x9k3rUJSFM6dgNCFR3E5B5MSoA8TGBFqoI3GCVVf4XobMXQsuoUYo02JRsiI+fNC uiPNaRc0HQ5HrFyQH+vy7mE6WTnhJLgFhZSKd000laAmX46XIDE21IuDQsimL+T8kvgt wgnrf++X/Lac3Bkb2tK4hTBT6fn1jKxSdzKtYqi8vNGL0efZnAHfm5UXBRfIhvgYNBy8 NJKSNZywUohJwUMRAz7glQ+nVoo4BDF71c4nDzr+YoXSbsE4zMDtipvs+Tnxr/3DOosW GDNSrYHWsWnevJPLf7jHxKi7NBGog/tCaews4wkKX1UXd5tHIVrudp/QsorjEurjF5al EtJg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=UEZXVMsWcQmpBrcUqpLjBAUUDSbgb6OeeiQnwWVFAk8=; b=Rpo1h6RA1L5LQ4q4zoIPrBGgN8c1nMOgzupBf6ke4iiuAhpWcZ2NQmb27Cjqgj6E4k QeGcfbLLAoSlhAy+QMvElNtJlHXVkW/M4FSQVuVt2uVgBaRocL59ycUZguQR9sHb0nCj DXeLCxZXKWGIQafce+xz0cC6b3hzbcgHj8fW3tZhVHSubfw6lDIVZUmyO/nYOM0aLafl CJCBJLqVHj/LJOdGedaiKjy/Mw9WzeIbpZqiL49h008Xd3ExjkKQg+FC5KQrNc0HZDHt BiR0dENwcIuJHmnNXE6jIUYNaoTpuMJmJtfktF8ab2R33SCGUKxDEr2sQeqeM0bFnOUo lDtA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=tsv+Ur4L; 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 c64si185473pga.513.2018.02.01.11.59.49; Thu, 01 Feb 2018 12:00:04 -0800 (PST) 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=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=tsv+Ur4L; 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 S1754885AbeBAT6I (ORCPT + 99 others); Thu, 1 Feb 2018 14:58:08 -0500 Received: from bombadil.infradead.org ([65.50.211.133]:47353 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754594AbeBAT6E (ORCPT ); Thu, 1 Feb 2018 14:58:04 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=UEZXVMsWcQmpBrcUqpLjBAUUDSbgb6OeeiQnwWVFAk8=; b=tsv+Ur4L/7bO/IauUzIU30gBf gNGGUUv7s7AP9T1qBlSCJ4HuKKqlAmys79ktXsJbGhitWsVgfVhvl/vCfxhCgNuF8sHSBzGiDzE/F Be9Qe8zpYg9CWj92RtI0dE8GL10rxWWDOUT/cngMFYVOHGS/xi4ZHxtHAPXPcgJ9A2aN+le1js6+b 4s9kUdFajzQudtBiFwYd5YAEI2OOGTeYt2/o2uSvqBPzbITy5WyO7mvjWhsYnFQrs+nIkNAbM1p72 Lv6avK0bW1Zv3Z5GbliH0IP9TL4AmzwMw+nXrSVKMRZKSn1GChMvEgGlQCmopYha3mqKaRfRF3moY pYn3/KqCw==; Received: from willy by bombadil.infradead.org with local (Exim 4.89 #1 (Red Hat Linux)) id 1ehKzd-00078s-Gv; Thu, 01 Feb 2018 19:57:57 +0000 Date: Thu, 1 Feb 2018 11:57:57 -0800 From: Matthew Wilcox To: Andrey Ryabinin Cc: Andrew Morton , Paul Menzel , Alexander Potapenko , Dmitry Vyukov , kasan-dev@googlegroups.com, linux-kernel@vger.kernel.org, linux-mm@kvack.org, stable@vger.kernel.org Subject: Re: [PATCH] mm/kasan: Don't vfree() nonexistent vm_area. Message-ID: <20180201195757.GC20742@bombadil.infradead.org> References: <12c9e499-9c11-d248-6a3f-14ec8c4e07f1@molgen.mpg.de> <20180201163349.8700-1-aryabinin@virtuozzo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180201163349.8700-1-aryabinin@virtuozzo.com> User-Agent: Mutt/1.9.1 (2017-09-22) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Feb 01, 2018 at 07:33:49PM +0300, Andrey Ryabinin wrote: > + case MEM_OFFLINE: { > + struct vm_struct *vm; > + > + /* > + * Only hot-added memory have vm_area. Freeing shadow > + * mapped during boot would be tricky, so we'll just > + * have to keep it. > + */ > + vm = find_vm_area((void *)shadow_start); > + if (vm) > + vfree((void *)shadow_start); > + } This looks like a complicated way to spell 'is_vmalloc_addr' ...