Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp5305544rwb; Mon, 14 Nov 2022 02:32:11 -0800 (PST) X-Google-Smtp-Source: AA0mqf6bKRQoPa6bB0aQmoOOexS77omjaSSwI8ex5wBd6ch0p23Mq9PswYIt6xArLPBxCJH6MUq6 X-Received: by 2002:a17:90a:343:b0:213:ba14:3032 with SMTP id 3-20020a17090a034300b00213ba143032mr13215586pjf.111.1668421931054; Mon, 14 Nov 2022 02:32:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668421931; cv=none; d=google.com; s=arc-20160816; b=sPNRziBOv2uEFNihp1Ho0Xzqp/RfVxRgECLp7erOQWFvffgKux9CZkcVVAyvrdn5wB SflfacYBklgx6CbfuWmV/y9+Ljh4XEw0YjDzN2l5MsTRzdY1Dm6bMLiqtaqP2dee/XeD 9lXjxubevv2G3aMs+3MZ3SU/6Ngh07ByAyYZpJg+EbA3MkG8Ruj9edBflUn6rNnB1MYO qm4lWqIiPrZ85qfL44pC2xvRKyZjoEITDGYDFGgrFgmmjwzmL9A04Ju7b0WywtiQokXZ m6b8NApWNmiiYcHfaK4+HWM5f8GUNZsK2yjYHsKP2XL0WqKRuzvL33JTXaP13SIal95G 1Rkg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=fAUbn1cd7nvIpMehCbcvODwqPqsDdngaN43UPC82ebs=; b=NMM/dqRpWka4jsLclEv5346dvUTT06KtUxiZxhhHvtsNRbhoQiIOZNqjaD3spZ7Amc 4bBn4oZk3Gmkhs0KDiKLfTqTyJ7bcy9+pQHs6yWpDWoHCilSB87H/vIJlIFxBCkI81tM 7lwHxjr8uhS1PMiPAs+edzb3BARAsWdYWNCPpqClL+uLGzhEZeHf7zIbdZMag9JjJh/4 gLx1SbBNbzFtbYNDv1e7dDRiFqlg/riBBxTU+d2vUK5dltX3dTtxAoFk3n3Y0EfS2hhp I4iQRgQ3XNH4i8WVBreeVLoB925ZbSt02jnwzV1oQ96M7AglDPVvRK/Nv5UttX8Gbd7Z 75VQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=H3wZosPZ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h69-20020a638348000000b0045f5e2b350esi8610219pge.466.2022.11.14.02.31.59; Mon, 14 Nov 2022 02:32:11 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=H3wZosPZ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S236875AbiKNKCa (ORCPT + 89 others); Mon, 14 Nov 2022 05:02:30 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39120 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237133AbiKNKCD (ORCPT ); Mon, 14 Nov 2022 05:02:03 -0500 Received: from mail-oi1-x235.google.com (mail-oi1-x235.google.com [IPv6:2607:f8b0:4864:20::235]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0373B22501 for ; Mon, 14 Nov 2022 01:59:23 -0800 (PST) Received: by mail-oi1-x235.google.com with SMTP id b124so10888133oia.4 for ; Mon, 14 Nov 2022 01:59:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=fAUbn1cd7nvIpMehCbcvODwqPqsDdngaN43UPC82ebs=; b=H3wZosPZzj1VfAmg44IIbwylidbEuoNBx3ZSbkJHEftIUXjxFI4lIAeeeQfH/AA/mk DoImC1qhnnNFU1H4BArc1V2YSu2bzjgOFhzKqNgDVLHGwHSXmjLGmirIoORAKIwXqNJY 8rbnkuwG3+6G/Z0bLn9I63fn9vemzSi18/1QL6sj+bUG3s6Gfgbfmu1WC+ACpBonDzoJ iaw7zvh7dvRHkh5LNUklHpvFM0Xr0DN+CPM0RJmkU8KGYJZmHlqtI+gKQyFhILJyU1tm V21f6pGhd/x5b7rl07yTzWjzsuHyIt2aZUQEaXyB1bSzVS/cAQaHWlmak0QQE5wEdVXF Rk5Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=fAUbn1cd7nvIpMehCbcvODwqPqsDdngaN43UPC82ebs=; b=r13u/e9/BPh469aI0LdzfZtLLP2ch4yvuaWV3oCtkBJ9lZazrkJbR/mhG4tBVYf5yZ VMCxkSd1wIqT9RQ/zPPN9KDcWrowUbhNw+uJ5M59lkXYss8HGfpIn+55jNy+WQaDLNRn 0FGTqZwFD1miwF5lgvR9ePYy758EqUXV5kfx3u+rEbB4YClxEiq6DGxQ3unGp7ykZPGu nZOpVQbQJdvSNsr7fjhfr40tLggSNq72fVAKYc9iWxqe9EP/lnkcRD8seZMKIMZsNOLN aKe3UDiA89MdCI7R4n8BiFEUCw+/mKxGY/g9CLenFzCa0911z9ny5mEMUYpS0kaqUWdN Lajg== X-Gm-Message-State: ANoB5pmstGtkBghQtcLpnKp5LDiEtOCAlYwwDQDkITdObhm42s/xpBup aR9w8KwLQBpllUB6VWB0KrISHtN+cPQ00iYeTfV8pqOObRR6ScwE X-Received: by 2002:a05:6808:3011:b0:35a:7e1d:3d72 with SMTP id ay17-20020a056808301100b0035a7e1d3d72mr5542661oib.233.1668419961901; Mon, 14 Nov 2022 01:59:21 -0800 (PST) MIME-Version: 1.0 References: <0000000000009586e205ed4679f4@google.com> In-Reply-To: From: Dmitry Vyukov Date: Mon, 14 Nov 2022 10:59:10 +0100 Message-ID: Subject: Re: [syzbot] WARNING: locking bug in hugetlb_no_page To: Mike Kravetz Cc: syzbot , akpm@linux-foundation.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, llvm@lists.linux.dev, nathan@kernel.org, ndesaulniers@google.com, songmuchun@bytedance.com, syzkaller-bugs@googlegroups.com, trix@redhat.com, Hillf Danton Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-17.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, USER_IN_DEF_DKIM_WL,USER_IN_DEF_SPF_WL autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 14 Nov 2022 at 03:24, Mike Kravetz wrote: > > On 11/13/22 10:50, Mike Kravetz wrote: > > On 11/13/22 16:36, Dmitry Vyukov wrote: > > > On Sat, 12 Nov 2022 at 15:03, syzbot > > > wrote: > > > > > > > > Hello, > > > > > > > > syzbot found the following issue on: > > > > > > > > HEAD commit: 1621b6eaebf7 Merge branch 'for-next/fixes' into for-kernelci > > > > git tree: git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci > > > > console output: https://syzkaller.appspot.com/x/log.txt?x=13bd511e880000 > > > > kernel config: https://syzkaller.appspot.com/x/.config?x=606e57fd25c5c6cc > > > > dashboard link: https://syzkaller.appspot.com/bug?extid=d07c65298d2c15eafcb0 > > > > compiler: Debian clang version 13.0.1-++20220126092033+75e33f71c2da-1~exp1~20220126212112.63, GNU ld (GNU Binutils for Debian) 2.35.2 > > > > userspace arch: arm64 > > > > syz repro: https://syzkaller.appspot.com/x/repro.syz?x=13315856880000 > > > > C reproducer: https://syzkaller.appspot.com/x/repro.c?x=173614d1880000 > > > > > > > > Downloadable assets: > > > > disk image: https://storage.googleapis.com/syzbot-assets/82aa7741098d/disk-1621b6ea.raw.xz > > > > vmlinux: https://storage.googleapis.com/syzbot-assets/f6be08c4e4c2/vmlinux-1621b6ea.xz > > > > kernel image: https://storage.googleapis.com/syzbot-assets/296b6946258a/Image-1621b6ea.gz.xz > > > > > > > > IMPORTANT: if you fix the issue, please add the following tag to the commit: > > > > Reported-by: syzbot+d07c65298d2c15eafcb0@syzkaller.appspotmail.com > > > > > > This may have the same root cause as: > > > > > > possible deadlock in hugetlb_fault > > > https://lore.kernel.org/all/CACT4Y+ZWNV6ApzEv0UrsF2T8JWmXez_-H-EGMii-S_2JbXv07Q@mail.gmail.com/ > > > > > > and there is a potential explanation as to what may be the problem. > > > > Thanks Dmitry! > > > > An issue with this new hugetlb locking was previously reported and I have been > > working on a solution. When I look at the reproducer, I see that it is calling > > madvise(MADV_DONTNEED). This triggers the other issue and could certainly > > cause the issue reported here. > > > > Proposed patches are here and in next-20221111: > > https://lore.kernel.org/linux-mm/20221111232628.290160-1-mike.kravetz@oracle.com/ > > > > I am currently trying to run the reproducer, but it is not reproducing quickly. > > Since this is a timing issue that as expected. Interesting that this > > report is run on arm64 and I am trying to reproduce on x86. Although, the > > issue is not architecture specific in any way. > > After tweaking my config, I was able to reliably reproduce. > > > I'll keep looking, but am fairly confident this is the root cause. > > I was also able to verify the series above addresses the issue. Let's tell syzbot about the fix so that it reports similar issues in future: #syz fix: hugetlb: don't delete vma_lock in hugetlb MADV_DONTNEED processing