Received: by 2002:a89:413:0:b0:1fd:dba5:e537 with SMTP id m19csp1678443lqs; Sat, 15 Jun 2024 22:54:34 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCV8AuZbwqdkvLGilwEfnZ/pzmEeKR6+w/IdP46oEe5qdXbM/BkZP+sI+HxJqj23RiBb0btVxqOF5Cldn0As7hKf//foZTNPBVTYGqiIDw== X-Google-Smtp-Source: AGHT+IGN5ZOb6KlLjmibGqkfbYsWJOi8cDRi5MBb8Q31W5eO75sRi/giXQMecGGDSWOQ3sFq2Dag X-Received: by 2002:a05:6512:3e25:b0:52c:8b03:99d1 with SMTP id 2adb3069b0e04-52ca6e92adcmr6961785e87.48.1718517274396; Sat, 15 Jun 2024 22:54:34 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718517274; cv=pass; d=google.com; s=arc-20160816; b=IHUmlMwn303c5QiKlJ04X/ySN3hJOq19gDtRU5DqQE5UE4LOhB4nvZ/FwohQZK3MNt MMj86CcwAP+nQYI21iyCzkuqQ7UHjFEo7WEqQsEPdfwlUZVhByZF8JR0csOiTHg22kMF 6jzQGLB2+7/DvJR9WatL/NQdmc4jhe8jWmfwWq1ikiMz0ekmNFptg4Z9qOwHD+W4g2Et hmvzfYWPJBTQhYxioo6WNPlC8cE5G7nYcXywWybemNR5pvNzzNJ0VLvuOAcAVuG+kVQ5 OHskcRqOnuSKe3wuHY18gTVlKbX6FVW6JQsh5KD7C2xfhGt9CWwgCBQm/BROPGZoYVO2 QpjA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=to:from:subject:message-id:in-reply-to:date:mime-version :list-unsubscribe:list-subscribe:list-id:precedence; bh=romJDKF4YYdUcNlHKmmiJoWHinqaoX9oJ6SM72wKzyk=; fh=VU+hfMEMTgxZ3nbjpemcCdya+2ooMf3CYsktKs1dzDE=; b=QmDcoxx4WQDQGoNAwKVKrKrKnWska63tGPqTgBx6DFRVBrOq3d+VtBdRFzXXOwBuAV AvtzQw1+oDT2JAmxFy7nWbxSxlcWoYtri3eVWefxsxiDY08FqmaC618f2P2WSVhaJ33S flv2JzQav99cBZE8zCdUNztNqP7uJasT5LCskUCdFEfOeykzctPuzxT1lMI/FtGwO4xL LOM58LcLRba7aNW98vIalFtH13w3v1y5i6aYxCFD7KAdfaj5G4Q8uXonRRXk+aChAZpr nQ6e5P1kWllTDSbqbc2PMewZwqfZybsp2QuQFZkZhnIWrSSxyflT2Uq6MwNXsFSIXhPV YbuQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=m3kw2wvrgufz5godrsrytgd7.apphosting.bounces.google.com); spf=pass (google.com: domain of linux-kernel+bounces-216124-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-216124-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=appspotmail.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id a640c23a62f3a-a6f56d43ad3si323754966b.226.2024.06.15.22.54.34 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 15 Jun 2024 22:54:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-216124-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=m3kw2wvrgufz5godrsrytgd7.apphosting.bounces.google.com); spf=pass (google.com: domain of linux-kernel+bounces-216124-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-216124-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=appspotmail.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id C61091F22077 for ; Sun, 16 Jun 2024 05:54:33 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D0D8716DEA4; Sun, 16 Jun 2024 05:54:22 +0000 (UTC) Received: from mail-il1-f207.google.com (mail-il1-f207.google.com [209.85.166.207]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B574416D329 for ; Sun, 16 Jun 2024 05:54:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.166.207 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718517262; cv=none; b=L+GQoV8VBTDWTBKS7xHEDeKgoCI2dzInde6hyslsNgvMwn3eA2N7a6o0dGTfikBfkGNaCdGAK5hGiqFxTotiOgItdcz8RKNgSlWCqv0+pNHsgm0tVjeFDrKjYveLHxWiiZRacJYHl1YQ4MSf1UKIGYAuAacoDuTgDAg0QsaHwB0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718517262; c=relaxed/simple; bh=B1Mi2iB4rh+LdPeBChRnGFShUhSfHM6ihPGxVKoaAwM=; h=MIME-Version:Date:In-Reply-To:Message-ID:Subject:From:To: Content-Type; b=fGxnsCHRc+/qBqjZx+5Y+9LrZR/Q1emmrHqdLAZ9DsuTFruOAtUrAamtrLS33kCXI1bsTUX5ds3eJcczvlv55uvCd9ku+otOxqGT2b27A/VZWj2tTzqDEeyhFO1E1IiomSuzArCsHossQxt2MhqACTAkflb1FURzgfAJrpBXU4I= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=syzkaller.appspotmail.com; spf=pass smtp.mailfrom=M3KW2WVRGUFZ5GODRSRYTGD7.apphosting.bounces.google.com; arc=none smtp.client-ip=209.85.166.207 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=syzkaller.appspotmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=M3KW2WVRGUFZ5GODRSRYTGD7.apphosting.bounces.google.com Received: by mail-il1-f207.google.com with SMTP id e9e14a558f8ab-3737b3ae019so33025275ab.2 for ; Sat, 15 Jun 2024 22:54:20 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718517260; x=1719122060; h=to:from:subject:message-id:in-reply-to:date:mime-version :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=romJDKF4YYdUcNlHKmmiJoWHinqaoX9oJ6SM72wKzyk=; b=Bt7sIMb52rBLtkg6LRc1X5THZqBQFlXr/cy7iJMjmn7BY5BprhvYWmYwal4P+Q972G Na39hx2HI5dDxKXSbJGecPyBpBM+UcI4VgcUnZuDUGX+2P0p5TO8JNpZUit5lDku7eZB geuoeeWW/1GUsWSGf3H7PkFXS1Nnu4p/TUlhc2o0qBu/OgRwjZ+cEOdm0dqB226Lnrai mgzeQUvdKUCxbTKIVCJk3ua+4WREy3oyzk1DWLKVIqSdpN4ES0mQTGj6R2gXY3GtRS7O FMfx0i99LsRCbj2/WFIYGjZl1IEcGAKbPj8TLoS6eZHtycX5AWN/W1ftXYtPUDzHRR2V M19A== X-Forwarded-Encrypted: i=1; AJvYcCWiy+1fbRZJqeyHITnp9ChVrRV3BQ7LT/XR4MkAs0vpPPWTxj4FCXokzLfC0k+GJ5i8ZyAabDXSwGa1E5+MO71aKftmDUk7Pq91U5kX X-Gm-Message-State: AOJu0YyiMrHHdgeLrOJ1WdKUvpYdQ5wqBVx058B0R9WAXc61u4/J9vX7 lvKDwYtUn2u8EsjjhRfnH56yG9yha13claLdol6SsIcWFK7B4TDggFj9cJ0un+fGdnYFgKNS711 uaoBU7+tOOcPBf6B9bSNJX7s1OV3GfhRlXZkraWPYV/RzHIOwbMuwtT4= Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Received: by 2002:a05:6e02:1c29:b0:375:9deb:ceb8 with SMTP id e9e14a558f8ab-375e1014718mr3864085ab.3.1718517259888; Sat, 15 Jun 2024 22:54:19 -0700 (PDT) Date: Sat, 15 Jun 2024 22:54:19 -0700 In-Reply-To: <00000000000041df050616f6ba4e@google.com> X-Google-Appengine-App-Id: s~syzkaller X-Google-Appengine-App-Id-Alias: syzkaller Message-ID: <000000000000d0fffc061afb7a2c@google.com> Subject: Re: [syzbot] [mm?] possible deadlock in __mmap_lock_do_trace_start_locking From: syzbot To: akpm@linux-foundation.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, netdev@vger.kernel.org, syzkaller-bugs@googlegroups.com Content-Type: text/plain; charset="UTF-8" syzbot has found a reproducer for the following issue on: HEAD commit: 36534d3c5453 tcp: use signed arithmetic in tcp_rtx_probe0_.. git tree: bpf console output: https://syzkaller.appspot.com/x/log.txt?x=110e9dde980000 kernel config: https://syzkaller.appspot.com/x/.config?x=333ebe38d43c42e2 dashboard link: https://syzkaller.appspot.com/bug?extid=6ff90931779bcdfc840c compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40 syz repro: https://syzkaller.appspot.com/x/repro.syz?x=1585acfa980000 C reproducer: https://syzkaller.appspot.com/x/repro.c?x=17bdb7ee980000 Downloadable assets: disk image: https://storage.googleapis.com/syzbot-assets/4e648f638b5f/disk-36534d3c.raw.xz vmlinux: https://storage.googleapis.com/syzbot-assets/bbe0d41240f1/vmlinux-36534d3c.xz kernel image: https://storage.googleapis.com/syzbot-assets/17eb17ecd214/bzImage-36534d3c.xz IMPORTANT: if you fix the issue, please add the following tag to the commit: Reported-by: syzbot+6ff90931779bcdfc840c@syzkaller.appspotmail.com ============================================ WARNING: possible recursive locking detected 6.10.0-rc2-syzkaller-00242-g36534d3c5453 #0 Not tainted -------------------------------------------- syz-executor181/5090 is trying to acquire lock: ffff8880b9538828 (lock#9){+.+.}-{2:2}, at: local_lock_acquire include/linux/local_lock_internal.h:29 [inline] ffff8880b9538828 (lock#9){+.+.}-{2:2}, at: __mmap_lock_do_trace_start_locking+0x83/0x620 mm/mmap_lock.c:230 but task is already holding lock: ffff8880b9538828 (lock#9){+.+.}-{2:2}, at: local_lock_acquire include/linux/local_lock_internal.h:29 [inline] ffff8880b9538828 (lock#9){+.+.}-{2:2}, at: __mmap_lock_do_trace_start_locking+0x83/0x620 mm/mmap_lock.c:230 other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(lock#9); lock(lock#9); *** DEADLOCK *** May be due to missing lock nesting notation 3 locks held by syz-executor181/5090: #0: ffff8880b9538828 (lock#9){+.+.}-{2:2}, at: local_lock_acquire include/linux/local_lock_internal.h:29 [inline] #0: ffff8880b9538828 (lock#9){+.+.}-{2:2}, at: __mmap_lock_do_trace_start_locking+0x83/0x620 mm/mmap_lock.c:230 #1: ffffffff8e333fa0 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:329 [inline] #1: ffffffff8e333fa0 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:781 [inline] #1: ffffffff8e333fa0 (rcu_read_lock){....}-{1:2}, at: get_mem_cgroup_from_mm+0x38/0x2a0 mm/memcontrol.c:1265 #2: ffffffff8e333fa0 (rcu_read_lock){....}-{1:2}, at: trace_call_bpf+0xbc/0x8a0 stack backtrace: CPU: 1 PID: 5090 Comm: syz-executor181 Not tainted 6.10.0-rc2-syzkaller-00242-g36534d3c5453 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/07/2024 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x241/0x360 lib/dump_stack.c:114 check_deadlock kernel/locking/lockdep.c:3062 [inline] validate_chain+0x15d3/0x5900 kernel/locking/lockdep.c:3856 __lock_acquire+0x1346/0x1fd0 kernel/locking/lockdep.c:5137 lock_acquire+0x1ed/0x550 kernel/locking/lockdep.c:5754 local_lock_acquire include/linux/local_lock_internal.h:29 [inline] __mmap_lock_do_trace_start_locking+0x9c/0x620 mm/mmap_lock.c:230 __mmap_lock_trace_start_locking include/linux/mmap_lock.h:29 [inline] mmap_read_trylock include/linux/mmap_lock.h:162 [inline] stack_map_get_build_id_offset+0x98a/0x9d0 kernel/bpf/stackmap.c:141 __bpf_get_stack+0x4ad/0x5a0 kernel/bpf/stackmap.c:449 bpf_prog_e6cf5f9c69743609+0x42/0x46 bpf_dispatcher_nop_func include/linux/bpf.h:1243 [inline] __bpf_prog_run include/linux/filter.h:691 [inline] bpf_prog_run include/linux/filter.h:698 [inline] bpf_prog_run_array include/linux/bpf.h:2103 [inline] trace_call_bpf+0x369/0x8a0 kernel/trace/bpf_trace.c:147 perf_trace_run_bpf_submit+0x7c/0x1d0 kernel/events/core.c:10269 perf_trace_lock+0x388/0x490 include/trace/events/lock.h:50 trace_lock_release include/trace/events/lock.h:69 [inline] lock_release+0x986/0x9f0 kernel/locking/lockdep.c:5765 rcu_lock_release include/linux/rcupdate.h:339 [inline] rcu_read_unlock include/linux/rcupdate.h:812 [inline] get_mem_cgroup_from_mm+0x1ad/0x2a0 mm/memcontrol.c:1271 get_mm_memcg_path+0x1b/0x600 mm/mmap_lock.c:202 __mmap_lock_do_trace_start_locking+0x134/0x620 mm/mmap_lock.c:230 __mmap_lock_trace_start_locking include/linux/mmap_lock.h:29 [inline] mmap_read_lock include/linux/mmap_lock.h:143 [inline] acct_collect+0x7e7/0x830 kernel/acct.c:563 do_exit+0x936/0x27e0 kernel/exit.c:853 do_group_exit+0x207/0x2c0 kernel/exit.c:1023 __do_sys_exit_group kernel/exit.c:1034 [inline] __se_sys_exit_group kernel/exit.c:1032 [inline] __x64_sys_exit_group+0x3f/0x40 kernel/exit.c:1032 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f9c47742279 Code: 90 49 c7 c0 b8 ff ff ff be e7 00 00 00 ba 3c 00 00 00 eb 12 0f 1f 44 00 00 89 d0 0f 05 48 3d 00 f0 ff ff 77 1c f4 89 f0 0f 05 <48> 3d 00 f0 ff ff 76 e7 f7 d8 64 41 89 00 eb df 0f 1f 80 00 00 00 RSP: 002b:00007ffd321ae558 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7 RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f9c47742279 RDX: 000000000000003c RSI: 00000000000000e7 RDI: 0000000000000000 RBP: 00007f9c477bd2b0 R08: ffffffffffffffb8 R09: 00000000000000a0 R10: 00000000000000a0 R11: 0000000000000246 R12: 00007f9c477bd2b0 R13: 0000000000000000 R14: 00007f9c477bdd20 R15: 00007f9c47713400 --- If you want syzbot to run the reproducer, reply with: #syz test: git://repo/address.git branch-or-commit-hash If you attach or paste a git patch, syzbot will apply it before testing.