Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp709442imm; Thu, 26 Jul 2018 10:35:28 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfciP5CrymKnrN4Kt7AMyQLvOxvvkw2vIacG4O9NdghrZYIlx6MIg3ccborMM38WSEkgxlE X-Received: by 2002:a17:902:bd44:: with SMTP id b4-v6mr2847351plx.144.1532626528117; Thu, 26 Jul 2018 10:35:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532626528; cv=none; d=google.com; s=arc-20160816; b=oGcbAQuah+tXBfU6lNpuenFaCuo0d+xnlLwoGIngW6/NexpZuj/bTdal/a0NqnQTtk o4GKP8XFaH5AnhfaEy1lr8qwuVmnYWB6DJAq3lekBOBjZXTUa8PrzgBnmzSh+EIAg9UD 69A08iYLvDLt6MpgxBYQqwnjtB5sm+pqiRS6rn5sG0wcE3+lKC4FcdoUVOkNN7vOq0O/ Cz+uv3hJIc9JCJaCvjlLA3GIBY7rpm0tbodfsjve8bmIlkWAcIJvGp05yxjfnuhKSw9R RL1dhNpwOAcA+h4EuwvrjWc+amT+ViiZ8ZkyxbanNJUDou/5vW/lJ5PrixYlv8p/WUIB hRdQ== 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 :message-id:in-reply-to:subject:cc:to:from:date:dkim-signature :arc-authentication-results; bh=Pbzvirt74+CocRnPvyDxieVSgr06qHyxp3sIpx6ZmkU=; b=pT/mNvU2gLXJVWfXbLDp6nUtuSG91A/yeqVVo1Wsj/N/4/hNoTE3LJpmLqh65m+Mtj Q/ADXyw0oVPpifb42hNgiz5/IVIDk9Tk5Z5k30jb5Toi1eNyXGwhuPeizQB3N7U0SaIY cEoRZMuRsom0ESTqq69VRzszIxO+aYr7sca2ffT3FjDDe7O2PmaNv9IlXEkzeeyCJmfm qcvLwwIQWwMzS/dgbv79hIVQBuSapb4zwSV9U9ZKUlh3aeSJkRXT/w5wWXF7c14U9TpI gUfGtSaeNsUUexTUgY2nAPhMh0o8st1R+bmdntYi2kDRD9QJ9tuduh8JV13+QVDwZA5g YXww== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=QHqfnMGl; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l9-v6si1628335pfe.11.2018.07.26.10.35.13; Thu, 26 Jul 2018 10:35:28 -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=@google.com header.s=20161025 header.b=QHqfnMGl; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1733151AbeGZR6I (ORCPT + 99 others); Thu, 26 Jul 2018 13:58:08 -0400 Received: from mail-yb0-f196.google.com ([209.85.213.196]:36829 "EHLO mail-yb0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731801AbeGZR6I (ORCPT ); Thu, 26 Jul 2018 13:58:08 -0400 Received: by mail-yb0-f196.google.com with SMTP id s1-v6so891524ybk.3 for ; Thu, 26 Jul 2018 09:40:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:from:to:cc:subject:in-reply-to:message-id:references :user-agent:mime-version; bh=Pbzvirt74+CocRnPvyDxieVSgr06qHyxp3sIpx6ZmkU=; b=QHqfnMGl7NwuJ2KyUI87PEfIFKGwLkG3Rmnpzpw2QRqotlIVG6UkU/w12ABpqgeS0z JuelfRcIRGiGiEuG3cTXe/F/rADH7XwO1GCSnXWu9vAnUi8YRMODR09wb0R7Xx+r05Fz 6asOnUwv6MQ6RvJY73Xlb1hTxUqNMxdpqn1qB+uhdfR1Q0MraM1fkOyqy1ZFIGHAbfNu cQ+7ji6np1R2LBiMCcCQdYAiMGqTbynZbJbllSQaI8tRIFaxtSb9cAp/OkzmS4Mw2ikO O3lSGag5GUQaxR/nNpCgVmBOlCtxgWiyK7FU4ZFxUUY35we9VN5Ac4GkO4zkABZUgA6Z N1gQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:in-reply-to:message-id :references:user-agent:mime-version; bh=Pbzvirt74+CocRnPvyDxieVSgr06qHyxp3sIpx6ZmkU=; b=pl0g1zuhJhB0TBWWjWYEpi/wtKFvRwPucG3k9iLeNpCx8e2lJKBdTJuEOLsseIQoTE FYty/awZYWrSu7i0mtvwqIVilGnIHONCjPkPgkKiz4eXvR0ORbcJsFRDNEhjGP2DZntR DJbSZ7oyvkDgJ5mlQQ2+GBV2wZ4gE3vsgm0vAnYPUCy6LVNHJLimh2cY+s6eKLecGZ+8 ub6qDo4QihBF1D1XWHHoGt5x7Z2Bs8MmukOSLyvGro9t/Ck3QkJQf5I0IIccYkwZvhfX fpsIn0fqEzFiXEFjIyx8FWnceJJjVkltJl744JNMYv92GlOIuscOdH6Lt+GG6jXRbaYZ l7HA== X-Gm-Message-State: AOUpUlFwphLS+h1qVTgA4fMEBGa9wJsRjs7fXHREw2Ku7gY/KJB4glNb dVl8QEzUwP/epf6YepVekA9eFg== X-Received: by 2002:a5b:786:: with SMTP id b6-v6mr1548927ybq.160.1532623229802; Thu, 26 Jul 2018 09:40:29 -0700 (PDT) Received: from eggly.attlocal.net (172-10-233-147.lightspeed.sntcca.sbcglobal.net. [172.10.233.147]) by smtp.gmail.com with ESMTPSA id d6-v6sm756243ywa.85.2018.07.26.09.40.27 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 26 Jul 2018 09:40:28 -0700 (PDT) Date: Thu, 26 Jul 2018 09:40:20 -0700 (PDT) From: Hugh Dickins X-X-Sender: hugh@eggly.anvils To: Matthew Wilcox cc: Hugh Dickins , syzbot , "Kirill A. Shutemov" , Andrew Morton , linux-kernel@vger.kernel.org, linux-mm@kvack.org, syzkaller-bugs@googlegroups.com Subject: Re: kernel BUG at mm/shmem.c:LINE! In-Reply-To: <20180726143353.GA27612@bombadil.infradead.org> Message-ID: References: <000000000000d624c605705e9010@google.com> <20180709143610.GD2662@bombadil.infradead.org> <20180723140150.GA31843@bombadil.infradead.org> <20180723203628.GA18236@bombadil.infradead.org> <20180723225454.GC18236@bombadil.infradead.org> <20180726143353.GA27612@bombadil.infradead.org> User-Agent: Alpine 2.11 (LSU 23 2013-08-11) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 26 Jul 2018, Matthew Wilcox wrote: > On Wed, Jul 25, 2018 at 11:53:15PM -0700, Hugh Dickins wrote: > > and fixing the bug differently ;-) But many thanks for spotting it! I thought you might :) > > I'll look into the next bug you reported ... No need: that idea now works a lot better when I use the initialized "start", instead of the uninitialized "index". Hugh --- mmotm/mm/khugepaged.c 2018-07-20 17:54:41.978805312 -0700 +++ linux/mm/khugepaged.c 2018-07-26 09:20:22.416949014 -0700 @@ -1352,6 +1352,7 @@ static void collapse_shmem(struct mm_str goto out; } while (1); + xas_set(&xas, start); for (index = start; index < end; index++) { struct page *page = xas_next(&xas);