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 D46A1C433FE for ; Thu, 6 Oct 2022 01:16:05 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 7C29F8E0001; Wed, 5 Oct 2022 21:16:04 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 771F26B0074; Wed, 5 Oct 2022 21:16:04 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 617118E0001; Wed, 5 Oct 2022 21:16:04 -0400 (EDT) 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 3E4CA6B0074 for ; Wed, 5 Oct 2022 21:16:04 -0400 (EDT) Received: from smtpin12.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id D017EAB4EC for ; Thu, 6 Oct 2022 01:16:03 +0000 (UTC) X-FDA: 79988758206.12.838B9A5 Received: from mail-ed1-f45.google.com (mail-ed1-f45.google.com [209.85.208.45]) by imf07.hostedemail.com (Postfix) with ESMTP id 5131E40005 for ; Thu, 6 Oct 2022 01:16:03 +0000 (UTC) Received: by mail-ed1-f45.google.com with SMTP id m3so734233eda.12 for ; Wed, 05 Oct 2022 18:16:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date; bh=UD5WZvl07zDG0Ktotv+C2zDk5OW0CrTnjIhxhYrmHvc=; b=oLg/PNobtt8qLAw2VBBpEiqf8ghenKX/ITrIQYJt0lXo+PQUjATHGVQ1cuCPJHY5VT 0vr2qMrwXTJD2N1ilTauFiBcNfYqP2ZtHh/AzGYk3hcjiWduS5A6ZXdN+2GW0zMdyynC VZqMF7gvr18IVoiOvszZpnLQlasfaXZRMHLSQg21Ny1DCzMDPGBuVRA2bZHMZzQXnz6E v9UwRDpQ7cwYTg0UX9YUZbcyY2cA5tKd5aG1/AQ/aUoLdZ7BO4jaEIwCIex8nHoxqvky FfiKld2e6y0TKqyQ/iKynbIVMKsgEIE65UZmxXBYnHx9Ota2eoCjxQXziAshfijzjmLj Bx9g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date; bh=UD5WZvl07zDG0Ktotv+C2zDk5OW0CrTnjIhxhYrmHvc=; b=SE1+bfst0PcawUHgcC3afxXnOrbXwouRtpuA2ArKH4c7hkQMpRloTLJYNgH8sBGQNV ep3kKP20QQHc3sBkA86RBYh874XC0VAKy18zQOBWUXlK4FE5k04JHBFD4t35go3hXlPc bKY+56Rr8YfTcTcuScQPK8Wlumelxw0O76vqhqdE9hjgObBCjg59PGZSxbgXKGHlvGiq MiyF4H01iaTyuBx8GVvPeBjL0yrA7Gd6Bkyi9GK6EboygnLM6biZRlWSU9NRmuWZLK5u BYLzbfIbftow/t0XXSklQsqikj9ASq9ZFYJD4VS9hLxeDnYQUh8NMHDdPDIBaKmxyi2x hAYQ== X-Gm-Message-State: ACrzQf0q/V+FdJJhh0yNwZFM2efSAsDJvX5s9reeBZO9lLkwiznOK1en vMsv/Kl69DoCGJvOSKAmqrc= X-Google-Smtp-Source: AMsMyM4O2Gl6i1UpuoHysJlkuhFYMHWLZwHlt17pG0SJy5x0C3V5cbrFOj2bW3yUecTM1x3XOottYw== X-Received: by 2002:a05:6402:ea8:b0:456:d188:b347 with SMTP id h40-20020a0564020ea800b00456d188b347mr2242040eda.15.1665018961803; Wed, 05 Oct 2022 18:16:01 -0700 (PDT) Received: from mypc.localnet (host-79-17-38-224.retail.telecomitalia.it. [79.17.38.224]) by smtp.gmail.com with ESMTPSA id k11-20020a17090632cb00b007030c97ae62sm9460143ejk.191.2022.10.05.18.16.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 Oct 2022 18:16:00 -0700 (PDT) From: "Fabio M. De Francesco" To: akpm@linux-foundation.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, syzkaller-bugs@googlegroups.com Cc: syzbot Subject: Re: [syzbot] memory leak in __get_metapage Date: Thu, 06 Oct 2022 03:15:55 +0200 Message-ID: <4449089.LvFx2qVVIh@mypc> In-Reply-To: <0000000000008a5a2e05ea318aa9@google.com> References: <0000000000008a5a2e05ea318aa9@google.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="nextPart2273918.ElGaqSPkdT" Content-Transfer-Encoding: 7Bit ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1665018963; 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:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=UD5WZvl07zDG0Ktotv+C2zDk5OW0CrTnjIhxhYrmHvc=; b=tnEnePRKYyluQ6JaQMAYBuqejZazOuYZZ525an0Prk4eeIHYlx9VRHoRMr+dPdfcD6l5qf gtMPzM84nD9b7wfzIUuKk1GQJMhxzUPigq1jbZiG5SZ+oqOQwLhgdqO+9RYbffDw9ybQ/t Kq7h610EGUMMB3ezJ+9QpPSMCPrBMVs= ARC-Authentication-Results: i=1; imf07.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b="oLg/PNob"; spf=pass (imf07.hostedemail.com: domain of fmdefrancesco@gmail.com designates 209.85.208.45 as permitted sender) smtp.mailfrom=fmdefrancesco@gmail.com; dmarc=pass (policy=none) header.from=gmail.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1665018963; a=rsa-sha256; cv=none; b=XHSvsk/j9OpjjR1DlPAKHVF5emb9r2+FPr5whAycs0dgdprgUOUajSAxOLGVfMLlksWgyV TskEkBZoXbzFruEKeFLzW1TslQWUJFeWR1Qfm6q5wzjxAnaXHCUP2rFP+s8A3v+l31IqvC U5oJyWUq4Ecv3Eu7V/0tAp5fehmMVFs= X-Stat-Signature: o7xpo4g7azt95f3x8dsfgupnnwu61aka X-Rspamd-Queue-Id: 5131E40005 Authentication-Results: imf07.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b="oLg/PNob"; spf=pass (imf07.hostedemail.com: domain of fmdefrancesco@gmail.com designates 209.85.208.45 as permitted sender) smtp.mailfrom=fmdefrancesco@gmail.com; dmarc=pass (policy=none) header.from=gmail.com X-Rspamd-Server: rspam07 X-Rspam-User: X-HE-Tag: 1665018963-790683 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: This is a multi-part message in MIME format. --nextPart2273918.ElGaqSPkdT Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="UTF-8" On Tuesday, October 4, 2022 10:49:42 AM CEST syzbot wrote: > Hello, > > syzbot found the following issue on: > > HEAD commit: 4fe89d07dcc2 Linux 6.0 > git tree: upstream > console output: https://syzkaller.appspot.com/x/log.txt?x=169a7924880000 > kernel config: https://syzkaller.appspot.com/x/.config?x=21254cf9c7c084e0 > dashboard link: https://syzkaller.appspot.com/bug?extid=389b82b29093b3e2640a > compiler: gcc (Debian 10.2.1-6) 10.2.1 20210110, GNU ld (GNU Binutils for Debian) 2.35.2 > syz repro: https://syzkaller.appspot.com/x/repro.syz?x=10bdd7ec880000 > > Downloadable assets: > disk image: https://storage.googleapis.com/syzbot-assets/651a252f7035/ disk-4fe89d07.raw.xz > vmlinux: https://storage.googleapis.com/syzbot-assets/776feb8e0e5b/ vmlinux-4fe89d07.xz > > IMPORTANT: if you fix the issue, please add the following tag to the commit: > Reported-by: syzbot+389b82b29093b3e2640a@syzkaller.appspotmail.com > > BUG: memory leak > unreferenced object 0xffff888114339e80 (size 128): > comm "syz-executor.0", pid 3673, jiffies 4295017005 (age 12.610s) > hex dump (first 32 bytes): > 00 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ > 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ > backtrace: > [] mempool_alloc+0x73/0x230 mm/mempool.c:392 > [] alloc_metapage fs/jfs/jfs_metapage.c:176 [inline] > [] __get_metapage+0x38a/0x9b0 fs/jfs/jfs_metapage.c:651 > [] diNewExt+0x3f2/0x9d0 fs/jfs/jfs_imap.c:2265 > [] diAllocExt fs/jfs/jfs_imap.c:1945 [inline] > [] diAllocAG+0x9a4/0xd50 fs/jfs/jfs_imap.c:1662 > [] diAlloc+0x31f/0x900 fs/jfs/jfs_imap.c:1583 > [] ialloc+0x6a/0x3a0 fs/jfs/jfs_inode.c:56 > [] jfs_mkdir+0xf7/0x480 fs/jfs/namei.c:225 > [] vfs_mkdir+0x223/0x340 fs/namei.c:4013 > [] do_mkdirat+0x1a5/0x1e0 fs/namei.c:4038 > [] __do_sys_mkdir fs/namei.c:4058 [inline] > [] __se_sys_mkdir fs/namei.c:4056 [inline] > [] __x64_sys_mkdir+0x69/0x90 fs/namei.c:4056 > [] do_syscall_x64 arch/x86/entry/common.c:50 [inline] > [] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80 > [] entry_SYSCALL_64_after_hwframe+0x63/0xcd > > BUG: memory leak > unreferenced object 0xffff888114339e00 (size 128): > comm "syz-executor.0", pid 3673, jiffies 4295017005 (age 12.610s) > hex dump (first 32 bytes): > 00 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ > 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ > backtrace: > [] mempool_alloc+0x73/0x230 mm/mempool.c:392 > [] alloc_metapage fs/jfs/jfs_metapage.c:176 [inline] > [] __get_metapage+0x38a/0x9b0 fs/jfs/jfs_metapage.c:651 > [] diNewExt+0x3f2/0x9d0 fs/jfs/jfs_imap.c:2265 > [] diAllocExt fs/jfs/jfs_imap.c:1945 [inline] > [] diAllocAG+0x9a4/0xd50 fs/jfs/jfs_imap.c:1662 > [] diAlloc+0x31f/0x900 fs/jfs/jfs_imap.c:1583 > [] ialloc+0x6a/0x3a0 fs/jfs/jfs_inode.c:56 > [] jfs_mkdir+0xf7/0x480 fs/jfs/namei.c:225 > [] vfs_mkdir+0x223/0x340 fs/namei.c:4013 > [] do_mkdirat+0x1a5/0x1e0 fs/namei.c:4038 > [] __do_sys_mkdir fs/namei.c:4058 [inline] > [] __se_sys_mkdir fs/namei.c:4056 [inline] > [] __x64_sys_mkdir+0x69/0x90 fs/namei.c:4056 > [] do_syscall_x64 arch/x86/entry/common.c:50 [inline] > [] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80 > [] entry_SYSCALL_64_after_hwframe+0x63/0xcd > > BUG: memory leak > unreferenced object 0xffff888114339d80 (size 128): > comm "syz-executor.0", pid 3673, jiffies 4295017005 (age 12.610s) > hex dump (first 32 bytes): > 00 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ > 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ > backtrace: > [] mempool_alloc+0x73/0x230 mm/mempool.c:392 > [] alloc_metapage fs/jfs/jfs_metapage.c:176 [inline] > [] __get_metapage+0x38a/0x9b0 fs/jfs/jfs_metapage.c:651 > [] diNewExt+0x3f2/0x9d0 fs/jfs/jfs_imap.c:2265 > [] diAllocExt fs/jfs/jfs_imap.c:1945 [inline] > [] diAllocAG+0x9a4/0xd50 fs/jfs/jfs_imap.c:1662 > [] diAlloc+0x31f/0x900 fs/jfs/jfs_imap.c:1583 > [] ialloc+0x6a/0x3a0 fs/jfs/jfs_inode.c:56 > [] jfs_mkdir+0xf7/0x480 fs/jfs/namei.c:225 > [] vfs_mkdir+0x223/0x340 fs/namei.c:4013 > [] do_mkdirat+0x1a5/0x1e0 fs/namei.c:4038 > [] __do_sys_mkdir fs/namei.c:4058 [inline] > [] __se_sys_mkdir fs/namei.c:4056 [inline] > [] __x64_sys_mkdir+0x69/0x90 fs/namei.c:4056 > [] do_syscall_x64 arch/x86/entry/common.c:50 [inline] > [] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80 > [] entry_SYSCALL_64_after_hwframe+0x63/0xcd > > BUG: memory leak > unreferenced object 0xffff8881142f0300 (size 128): > comm "syz-executor.0", pid 3676, jiffies 4295017533 (age 7.330s) > hex dump (first 32 bytes): > 00 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ > 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ > backtrace: > [] mempool_alloc+0x73/0x230 mm/mempool.c:392 > [] alloc_metapage fs/jfs/jfs_metapage.c:176 [inline] > [] __get_metapage+0x38a/0x9b0 fs/jfs/jfs_metapage.c:651 > [] diNewExt+0x3f2/0x9d0 fs/jfs/jfs_imap.c:2265 > [] diAllocExt fs/jfs/jfs_imap.c:1945 [inline] > [] diAllocAG+0x9a4/0xd50 fs/jfs/jfs_imap.c:1662 > [] diAlloc+0x31f/0x900 fs/jfs/jfs_imap.c:1583 > [] ialloc+0x6a/0x3a0 fs/jfs/jfs_inode.c:56 > [] jfs_mkdir+0xf7/0x480 fs/jfs/namei.c:225 > [] vfs_mkdir+0x223/0x340 fs/namei.c:4013 > [] do_mkdirat+0x1a5/0x1e0 fs/namei.c:4038 > [] __do_sys_mkdir fs/namei.c:4058 [inline] > [] __se_sys_mkdir fs/namei.c:4056 [inline] > [] __x64_sys_mkdir+0x69/0x90 fs/namei.c:4056 > [] do_syscall_x64 arch/x86/entry/common.c:50 [inline] > [] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80 > [] entry_SYSCALL_64_after_hwframe+0x63/0xcd > #syz test git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git --nextPart2273918.ElGaqSPkdT Content-Disposition: attachment; filename="jfs.diff" Content-Transfer-Encoding: 7Bit Content-Type: text/x-patch; charset="UTF-8"; name="jfs.diff" diff --git a/fs/jfs/jfs_metapage.c b/fs/jfs/jfs_metapage.c index 2e8461ce74de..b3ba1cefc230 100644 --- a/fs/jfs/jfs_metapage.c +++ b/fs/jfs/jfs_metapage.c @@ -678,6 +678,7 @@ struct metapage *__get_metapage(struct inode *inode, unsigned long lblock, unlock: unlock_page(page); + put_page(page); return NULL; } --nextPart2273918.ElGaqSPkdT--