Received: by 10.223.176.5 with SMTP id f5csp1003128wra; Fri, 2 Feb 2018 09:31:47 -0800 (PST) X-Google-Smtp-Source: AH8x227MMzl+bi18ZKEzR6SKShL4HS1Hpxi1QVIvl+d9p9TVHXiGEG7i+G+Oom4nKYgXVYMoWv7o X-Received: by 2002:a17:902:b486:: with SMTP id y6-v6mr14926781plr.70.1517592707440; Fri, 02 Feb 2018 09:31:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517592707; cv=none; d=google.com; s=arc-20160816; b=t/6FN5wRSD1JTHqTIYBhgBw/af/PPx0NGgrAwpyxWUUNxN0dfyR3VCNsbu6pydHZzv jiEdx6zTDR/fb5Yeu24+drcv7N4kuPzcb2oBaEClwySLJN4eWHkzSNTP2A3Giuz7p7N8 ZArdkvrSjIf/1gdZWA5UjbzfNzXBpY6uLNHadCfwUopsnjk6GroII45JSiUQE0psaw5l GzbK9XLkyY41RdXXlkYU5NuLiAGM0QPLGpQhET9UQQMX7XxuhnHEesKKz/7bwsYz0qx7 fY1rwl/7cCT5n1SDB+5ve/X/q6gMmLEladoowgOjByFh6jPalTsWSJbM35cVOs1wBN+O 8OSw== 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=LGsiEmHZQxnIv4PCL8lI+jVrZxONP7d3IWdbXE6/HRY=; b=OaH0s0e4elQ8RVP8QqLcEATV8uF/KuPR8Du6S79/jRfyhGPJARHFZzOtSyIEkLP0zs W5xc//V2PEr7yOJfsmwbYI9lDqpbQS15t12MoNOg3wms1LWU2RK7/8yxpS3OI71gwBIn wpofWO+f+hw6U2idpc5E7F4m6jPfRBKbFI01GQ5yGHpEX3QRqRkYmxWsU8/WdQGeljo/ YSLqUq+ZOiE1k4u8ny24F2uXpX0cK2CiuH+hEwjQLW2KzXuIVAmom/vsKHXkdf/5E/HE UPLtet2ulGU/maei37tEp34ZA+imrobxzPgEMgnAumLMQ8z1rnk7Tz17RhCdyqLA5wGR iEDA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=T5CupFk6; 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 60-v6si2148882plc.444.2018.02.02.09.31.32; Fri, 02 Feb 2018 09:31:47 -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=T5CupFk6; 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 S1754189AbeBBRaR (ORCPT + 99 others); Fri, 2 Feb 2018 12:30:17 -0500 Received: from bombadil.infradead.org ([65.50.211.133]:51597 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753888AbeBBRUh (ORCPT ); Fri, 2 Feb 2018 12:20:37 -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=LGsiEmHZQxnIv4PCL8lI+jVrZxONP7d3IWdbXE6/HRY=; b=T5CupFk6OodGJa6+j4Q5mAFiU fnRiBaT/HHHoSLrWIjdQRVYbehXJ9auS9X0Y6T7i2HBIBNgJqdQorZ4s6a/ULDyzhyqeUdJAm0ttT idwhsMPdGtATBl5KvKiCyIxfrFIsWKgpknyKw+PKwfAQ0wBBTrtBCZFazq6SBc4KYgxRhxVHuD/3z OXU/P0ZuqN3Z0i2d28w8lfUG4r/Plu/JLCF4I6CVFu8yOkTDfeJNDzEkrQJbnXEIMx0C/FQkiLI1e +hyxuZSrTXGgD0ohqkYjD5uPYd87OJThTcVagQcvOJVUShr4vNFBmybLy1xw3TA5Dh+AmeBm3A57Q XMlvOrmIQ==; Received: from willy by bombadil.infradead.org with local (Exim 4.89 #1 (Red Hat Linux)) id 1ehf0l-0006eA-NH; Fri, 02 Feb 2018 17:20:27 +0000 Date: Fri, 2 Feb 2018 09:20:27 -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: <20180202172027.GB16840@bombadil.infradead.org> References: <12c9e499-9c11-d248-6a3f-14ec8c4e07f1@molgen.mpg.de> <20180201163349.8700-1-aryabinin@virtuozzo.com> <20180201195757.GC20742@bombadil.infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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 11:22:55PM +0300, Andrey Ryabinin wrote: > >> + vm = find_vm_area((void *)shadow_start); > >> + if (vm) > >> + vfree((void *)shadow_start); > >> + } > > > > This looks like a complicated way to spell 'is_vmalloc_addr' ... > > > > It's not. shadow_start is never vmalloc address. I'm confused. How can you call vfree() on something that isn't a vmalloc address?