From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932657AbdC2AIz (ORCPT ); Tue, 28 Mar 2017 20:08:55 -0400 Received: from aserp1040.oracle.com ([141.146.126.69]:18557 "EHLO aserp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932088AbdC2AIy (ORCPT ); Tue, 28 Mar 2017 20:08:54 -0400 Subject: Re: mm: BUG in resv_map_release To: Andrew Morton , Dmitry Vyukov References: <20170328163823.3a0445a058670be9254e115c@linux-foundation.org> Cc: nyc@holomorphy.com, Michal Hocko , "Kirill A. Shutemov" , Andrea Arcangeli , "linux-mm@kvack.org" , LKML , Andrey Ryabinin , Hillf Danton From: Mike Kravetz Message-ID: <8e87e893-526b-7324-33fb-783a544bab11@oracle.com> Date: Tue, 28 Mar 2017 17:07:34 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <20170328163823.3a0445a058670be9254e115c@linux-foundation.org> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-Source-IP: userv0021.oracle.com [156.151.31.71] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 03/28/2017 04:38 PM, Andrew Morton wrote: > On Thu, 23 Mar 2017 11:19:38 +0100 Dmitry Vyukov wrote: > >> Hello, >> >> I've got the following BUG while running syzkaller fuzzer. >> Note the injected kmalloc failure, most likely it's the root cause. >> > > Yes, probably the logic(?) in region_chg() leaked a > resv->adds_in_progress++, although I'm not sure how. And afaict that > code can leak the memory at *nrg if the `trg' allocation attempt failed > on the second or later pass around the retry loop. > > Blah. Does someone want to take a look at it? I sent out a patch to address this and Hillf Acked. Unfortunately, there was a typo in your e-mail when I sent out the patch. So, you may not have noticed. [PATCH] mm/hugetlb: Don't call region_abort if region_chg fails http://marc.info/?l=linux-mm&m=149033588500724&w=2 If you need/want me to send again, let me know. -- Mike Kravetz