From nobody Sat Feb 7 17:14:02 2026 Received: from mail-oo1-f69.google.com (mail-oo1-f69.google.com [209.85.161.69]) (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 2F1082E6CD3 for ; Fri, 30 Jan 2026 14:37:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.161.69 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769783871; cv=none; b=meBQj8KHBbceWXLtn0g5JZzwQFtZXqyEMq9pEn/hyy8NLZ4NjeOOdbh0uFHAJwEBwtZmbAvcba5ASkeIBkPOIp0HHjkh81CVp5UMagoXxblyPgoeTpf/0ro8S87nW+xhJH38899Uc0SFUfoJu/c/GkrgGV62ZLvru3/SYkzWjKA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769783871; c=relaxed/simple; bh=9AgLosKrUH4P/eaiAEJns+fVta+U6M45N59vCBqEeKM=; h=MIME-Version:Date:In-Reply-To:Message-ID:Subject:From:To: Content-Type; b=CVNH4G2HXZr6z4bR4pKHG6icCBhpA2dSjpdt0lqtsODZcAvfk6k+HYc7v4u3iaWYp55EL7zxBH7HNfghvGNOOVPJnhcPgelV5BIQNXOVLY05Sryb6cWY3VF9J9UZ2Sw7b+9aXZboVZ0Cy+P4z/XkcfH/6DTc7odS1+0jnDfZ+qs= 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.161.69 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-oo1-f69.google.com with SMTP id 006d021491bc7-663113778e6so1289855eaf.0 for ; Fri, 30 Jan 2026 06:37:49 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1769783869; x=1770388669; 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=EOj17Nz49Y6mvpDab+JIGzoxr5zSVWO6iu1phfMSE48=; b=hvt6pRuhundyfZF4dGVgddgvd9fc0W5VK3b6MQwWR8N387NjL47auAH7Me8LUj9zh8 2UiGr3Sm1g6t6bHPMUZrXNBAcHE66pPqyFzcSomqfQhaOaop1Lw+6YnvMWksrGxEH6nP j0XtB34uwNmKZUv8FQIm8vQozyvK5HQawQZ4qX5OlejQcJozyZyQBHoFjpiYinSFfnH6 tj0eCL+tt71GavhrGdEnl5i8OoUizB0QclkiPMdo+3S4ELYJTUx8IA+sTobJwfUqxNSz wCT5XZf1z4g94rkJ44E4NexiMocj7NeAqH3k17ERwSo04LHqkoZ5lCNJ4R1MU+eHxU4j s16Q== X-Gm-Message-State: AOJu0YxB30Pp2lWGhM3e6TfEgV2f9EK138EAS1qUuGMZZBqFU9sVJJOM OTeUXuorST+rawpwoPoHIDjrBuSeyqDWiQUhe3sQ9iUhMugLf1lAGfZ6iRCuTXM0vPIXzHePLfm 2kiu6XlJmv+D0uzriybLlWxzqawBz8DK0nVjVgeQsq4izap9LrtC3JVWezzQ= 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:6820:a03:b0:65d:4d4:e7b0 with SMTP id 006d021491bc7-6630ef31988mr1432235eaf.0.1769783869131; Fri, 30 Jan 2026 06:37:49 -0800 (PST) Date: Fri, 30 Jan 2026 06:37:49 -0800 In-Reply-To: <697cbeda.050a0220.142e72.0000.GAE@google.com> X-Google-Appengine-App-Id: s~syzkaller X-Google-Appengine-App-Id-Alias: syzkaller Message-ID: <697cc23d.a70a0220.72411.0007.GAE@google.com> Subject: Forwarded: [PATCH] gfs2: fix memory leak of kernel threads on mount failure From: syzbot To: linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" For archival purposes, forwarding an incoming command email to linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com. *** Subject: [PATCH] gfs2: fix memory leak of kernel threads on mount failure Author: kartikey406@gmail.com #syz test: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git= master Syzbot reported a memory leak in GFS2 when mounting fails after init_threads() has successfully created kernel threads. The issue occurs when gfs2_freeze_lock_shared() fails - the error path jumps to fail_per_node without cleaning up the threads created by init_threads(). The leak includes the thread name string, task_struct, credentials, and other thread-related allocations that are never freed when the mount operation fails at this point. Fix this by ensuring gfs2_destroy_threads() is called in the fail_per_node error path for read-write mounts, matching the condition used when creating the threads. Reported-by: syzbot+aac438d7a1c44071e04b@syzkaller.appspotmail.com Closes: https://syzkaller.appspot.com/bug?extid=3Daac438d7a1c44071e04b Signed-off-by: Deepanshu Kartikey --- fs/gfs2/ops_fstype.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fs/gfs2/ops_fstype.c b/fs/gfs2/ops_fstype.c index e7a88b717991..163dd7132957 100644 --- a/fs/gfs2/ops_fstype.c +++ b/fs/gfs2/ops_fstype.c @@ -1286,6 +1286,8 @@ static int gfs2_fill_super(struct super_block *sb, st= ruct fs_context *fc) =20 fail_per_node: init_per_node(sdp, UNDO); + if (!sb_rdonly(sb)) + gfs2_destroy_threads(sdp); fail_inodes: init_inodes(sdp, UNDO); fail_sb: --=20 2.43.0