From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id B00DEC4167E for ; Mon, 14 Nov 2022 09:59:24 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 094378E0001; Mon, 14 Nov 2022 04:59:24 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 01C946B0073; Mon, 14 Nov 2022 04:59:23 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id E01488E0001; Mon, 14 Nov 2022 04:59:23 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id CCAE26B0072 for ; Mon, 14 Nov 2022 04:59:23 -0500 (EST) Received: from smtpin06.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id 75A7DAB1CA for ; Mon, 14 Nov 2022 09:59:23 +0000 (UTC) X-FDA: 80131600206.06.76C2B57 Received: from mail-oi1-f177.google.com (mail-oi1-f177.google.com [209.85.167.177]) by imf07.hostedemail.com (Postfix) with ESMTP id 24FD540008 for ; Mon, 14 Nov 2022 09:59:22 +0000 (UTC) Received: by mail-oi1-f177.google.com with SMTP id q186so10861088oia.9 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=LTkBwwYAcI/m9Qc7gMViGmpxmwe77GiIxtwRcMuIPj0arMsCJ1yJbB04DCNoe7gDwm inyTltI/3WIUep9BnNQQ/Jf0cglAmt1CH0vjWUoRaQ9SIjkvpk0lHjJNBignLkSltdIx GJ79QqKML5+gJ9Zw3XXk21vmMBNjIwLU+RcMFb7nUQw1xbJd/C2sfWVdDPTA9aWcrLf0 /zAEmkS/s1byAbjICU0O2Q4CmcuKmtqYnZOf9enI9ltN9Co+qiPejbwLD1axLtLM6tiY FhY7Vk1O5Lmcln/OizYmiBOPGLYO/GGjudT4+hHWWm9BHJMgrA+ehlvCvCoBYQ1XiyHW D7EQ== X-Gm-Message-State: ANoB5pl/oJGGfhTk0Mp/AS1r63p1Rc2P6ccDhOvyFqi3AfzcRZ0WA4YC uBDPUps/a9Rf9pu7wPosXHeyuHxSpGF1gAhmMDQ+YQ== X-Google-Smtp-Source: AA0mqf46zD7/njam2K6zDWAjSR+U8f1+8URrgDwnGLzzSv1XrdaKhUynr2/wcC8ZNqS2oxdF3xkNjfZpNkWs49RNJWA= 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" ARC-Authentication-Results: i=1; imf07.hostedemail.com; dkim=pass header.d=google.com header.s=20210112 header.b=H3wZosPZ; spf=pass (imf07.hostedemail.com: domain of dvyukov@google.com designates 209.85.167.177 as permitted sender) smtp.mailfrom=dvyukov@google.com; dmarc=pass (policy=reject) header.from=google.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1668419963; a=rsa-sha256; cv=none; b=mP76gZtLBB+h+K5qm/NQlLJhu+UNH1iSo+0Y9uscesjxrvZmhZivzP+XB8NHzQO1ughWm1 ln/78A7P2O8L02G3xK+ZMnEPaoiTFjPFUbcwLnn4kz8lgh/mzubhkNdzeNx2vQO+0xTOsB EF0unsKAjnb0mjMeARk0mn0dUAT8F+M= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1668419963; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=fAUbn1cd7nvIpMehCbcvODwqPqsDdngaN43UPC82ebs=; b=Vn5R9XM1M+0ELjYLWpuonMSkAov6/oVLMdfhy/z+Mwb+eJoo0ybksglMDStrsWiEAE8VU1 Z3XGLfMWNWc1WlEAyLExhz4AJ/VtS/y5VMGuiUjeKOBhGYzCD4UrEC9neNWil0+3TcR7sy EXJ2f6ZiRNeyniB8Yk4Ks2EjoTjgPUM= X-Rspam-User: Authentication-Results: imf07.hostedemail.com; dkim=pass header.d=google.com header.s=20210112 header.b=H3wZosPZ; spf=pass (imf07.hostedemail.com: domain of dvyukov@google.com designates 209.85.167.177 as permitted sender) smtp.mailfrom=dvyukov@google.com; dmarc=pass (policy=reject) header.from=google.com X-Stat-Signature: p44qejpzxo7f1md7qcih88ada4z15u5n X-Rspamd-Queue-Id: 24FD540008 X-Rspamd-Server: rspam09 X-HE-Tag: 1668419962-180759 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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