From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.openvz.org (mail.openvz.org [69.168.225.77]) by lore.virtuozzo.com (Postfix) with ESMTPS id DF06C803F6 for ; Thu, 12 Nov 2026 00:12:30 +0000 (UTC) Received: from mail.openvz.org (localhost [127.0.0.1]) by mail.openvz.org (8.14.4/8.14.4) with ESMTP id 6AC0BCjW032335; Thu, 12 Nov 2026 03:11:18 +0300 DKIM-Filter: OpenDKIM Filter v2.11.0 mail.openvz.org 6AC0BCjW032335 Authentication-Results: mail.openvz.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=virtuozzo.com header.i=@virtuozzo.com header.b="n3WXyHkO" Received: from mail-wr1-f70.google.com (mail-wr1-f70.google.com [209.85.221.70]) by mail.openvz.org (8.14.4/8.14.4) with ESMTP id 6AC0AXNn032296 (version=TLSv1/SSLv3 cipher=AES128-GCM-SHA256 bits=128 verify=FAIL) for ; Thu, 12 Nov 2026 03:10:33 +0300 DKIM-Filter: OpenDKIM Filter v2.11.0 mail.openvz.org 6AC0AXNn032296 Received: by mail-wr1-f70.google.com with SMTP id ffacd0b85a97d-48e1d839ddaso2389777f8f.3 for ; Wed, 11 Nov 2026 16:10:33 -0800 (PST) X-Gm-Message-State: APuU4Z8zwumSS4KZIX4TT8m0etf5+LaSd+7K00ddwyFZDUF9ytVdR4Fq 6ayDqcJqwPj6UOcD+P1VydVQlTXs6OwPPZ0Dq8tQ2jvHtX57oQkZP8dL3nYTMz/xTm3mWWjISgq YnPykrD+rlg11Uc4G+9EPCTfKCArWkweCPpak7XqwQvqhSi0LftWo3g== X-Gm-Gg: AYBFou3WTxNtKPY5qOS+dQWVpJfWyvUVQDVB1EzsogzYqf3UoNe/f70bvGYatc3V17X Wqx0bEcOSetnMjz5DmcThXYlasrtmVzYeahWxAFR0MCTMtwPStWUuwZKePvU7Ai/3EAoENMoI59 tZTP6ytuEWbTXlQMog3rtohDkw2DM+GyM7BGjcY6Ww2xENzUHnmZA/k6yS0ijcBKTRTDWbHsksW YKzQWl+AB6ygyl0tdFJNP4elQIfu0OVDYHvgGOBiO8tKfAYQWh8yq6EdrzCkuyDp5L04WSUcez/ kduAWST1A0PFRGKE1rv4P69eSz5Vi19Ku38U0vPDizwYB7tfO9p9HLWXNH8QAbJ5RpkY71n+YDh ILQFMw8ewZfvgggZlsW0lnQmr X-Received: by 2002:a05:600c:3f08:b0:49e:7c8c:361d with SMTP id 5b1f17b1804b1-4ba0937820cmr63669265e9.22.1794442233420; Wed, 11 Nov 2026 16:10:33 -0800 (PST) X-Received: by 2002:a05:600c:3f08:b0:49e:7c8c:361d with SMTP id 5b1f17b1804b1-4ba0937820cmr63669015e9.22.1794442233039; Wed, 11 Nov 2026 16:10:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1794442233; cv=none; d=google.com; s=arc-20260327; b=ku33Ec874Abc2WJPDqjvHi3xKAgj3CYthB9BRkUryofXxcmwfFCV4Gc14rBTExBMb0 G8FJOU6HGn1yNe7oL7uHcwJ9Y1uEr64MKwAq/ii7mz71yx5TA7B+nsTsUURIzsWuXb8l R/RFBLsowCyN02ntC5Y8S9Z/Ovc3/e8BqS7c6x/x+CKFCdyB1W7xOA7NSiZ2S5utddmi /2hlEfiC9szoUKPQkAMhEBSC/eMGz0puQ+rXEa0/c+oBErU3lRdeCsra7kSyph9v60sO HzjnbjbLmDbA9v3HGw5tv7lzCRcJ+QGDvDsbpzpi73a2rUiWsvU2mbQKE5ApmxgVzG7r fc9Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20260327; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=Ot5d0fLkXTTyUSi0fdtNOYQldtAANu40Xr0CmZzX3ss=; fh=WpT6aB7RBAGHZeWZzqAr71yzRFbPTYkPWKsRagLn48Q=; b=rVeW5w4ouLOHLAGuhTeH/QDOfTwvDFR2knIeE6vzgTnBzEnctnoIOgFexLCf640rWG FQpVXGPiWWoakRuCa7PeBgCxbn3NqS0asIWJk6xhff/Q0LaAfFDgLgEqHXq7WnGH4avq oNq7YeBLKYaoDrifkL4nZUL6KisAd3mvdhEkiw8vB15wZe2RwDxqZJqADGdOHtEqdibF rvwXgiJ4qrlmzJODaIC7h3wNw7jJ5qmNi4qY7wFbQUzotx8tFnn6N/LpMyqFAs6zbQ3Z xvdQFSOF6olY1Ap9DvcvoAsBU5we34vCz2AxxVGNneAWqcfTOYBEzWluiB1vMBqq1R94 IREg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@virtuozzo.com header.s=relay header.b=n3WXyHkO; spf=pass (google.com: domain of eva.kurchatova@virtuozzo.com designates 130.117.225.111 as permitted sender) smtp.mailfrom=eva.kurchatova@virtuozzo.com; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=virtuozzo.com Received: from relay.virtuozzo.com (relay.virtuozzo.com. [130.117.225.111]) by mx.google.com with ESMTPS id 5b1f17b1804b1-4bb4e288cefsi22046275e9.7.2026.11.11.16.10.32 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Nov 2026 16:10:33 -0800 (PST) Received-SPF: pass (google.com: domain of eva.kurchatova@virtuozzo.com designates 130.117.225.111 as permitted sender) client-ip=130.117.225.111; Authentication-Results: mx.google.com; dkim=pass header.i=@virtuozzo.com header.s=relay header.b=n3WXyHkO; spf=pass (google.com: domain of eva.kurchatova@virtuozzo.com designates 130.117.225.111 as permitted sender) smtp.mailfrom=eva.kurchatova@virtuozzo.com; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=virtuozzo.com DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=virtuozzo.com; s=relay; h=MIME-Version:Message-ID:Date:Subject:From: Content-Type; bh=Ot5d0fLkXTTyUSi0fdtNOYQldtAANu40Xr0CmZzX3ss=; b=n3WXyHkOloqw sl+TwvAme8s9fSJZmxh3XeWnfbKxtiJB754qvqusffG6BblB+AxKGNqJx5Lg+E2lYclon4TZX3ejr X2v/l6/zHIpNnAqIi+w2UBXxf1CeG+82Fw3e5TjkRfs9x3aj+WkCPQ3lJrrSXEEsEJ7EN9wer6ciW OX3Bapct+QpAScaTvDIQXZ31E/bOQZBu90lpckVD0Quiy8nbpdaUleHDFlckinqC/J9/acheera9H 9N1S19/pejaqkjTUvcpYXvXukS+N8NW1UkY+ejjY8ovjvZFxS9nUIQ6hSxvLlNJQ+OdMWTlGckBZD K8yMv8Blm42SvXFp074vqQ==; Received: from ch-vpn.virtuozzo.com ([130.117.225.6] helo=LekKit-T14) by relay.virtuozzo.com with esmtp (Exim 4.96) (envelope-from ) id 1xRIKV-002DgU-0y; Thu, 12 Nov 2026 01:10:30 +0100 From: Eva Kurchatova To: khorenko@virtuozzo.com Date: Thu, 12 Nov 2026 02:07:57 +0200 Message-ID: <20261112000926.381308-7-eva.kurchatova@virtuozzo.com> X-Mailer: git-send-email 2.56.0 In-Reply-To: <20261112000926.381308-2-eva.kurchatova@virtuozzo.com> References: <20261112000926.381308-2-eva.kurchatova@virtuozzo.com> MIME-Version: 1.0 X-OZ-Fwd: true Cc: devel@openvz.org Subject: [Devel] [PATCH hci-8.1 v2 5/5] ms/eventfs: Initialize ei->children and ei->list in init_ei() X-BeenThere: devel@openvz.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: OpenVZ development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: devel-bounces@openvz.org Errors-To: devel-bounces@openvz.org From: Deepanshu Kartikey eventfs_create_dir() allocates the eventfs_inode and initializes it with init_ei(). But this does not initialize the eventfs_inode list_heads. If the eventfs_create_dir() fails due to memory pressure, it will call free_ei() before it initialized the lists, and that checks to make sure the eventfs_inode has no children. But because the list wasn't initialized, it will give a false warning. Fix it by moving the list initialization into init_ei(). Cc: stable@vger.kernel.org Fixes: 5790b1fb3d67 ("eventfs: Remove eventfs_file and just use eventfs_inode") Reported-by: syzbot+3ef80b4ed02226d04a06@syzkaller.appspotmail.com Closes: https://syzkaller.appspot.com/bug?extid=3ef80b4ed02226d04a06 Link: https://patch.msgid.link/20260824144653.54044-1-kartikey406@gmail.com Signed-off-by: Deepanshu Kartikey [ Rewrote change log ] Signed-off-by: Steven Rostedt (cherry picked from commit 1704aaaf5d22bc765c168402350d191e24e245bc) https://virtuozzo.atlassian.net/browse/VSTOR-154529 Feature: fix ms/tracefs Signed-off-by: Eva Kurchatova --- fs/tracefs/event_inode.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/fs/tracefs/event_inode.c b/fs/tracefs/event_inode.c index fbaa64e482e0..ca6e0a653efa 100644 --- a/fs/tracefs/event_inode.c +++ b/fs/tracefs/event_inode.c @@ -446,6 +446,8 @@ static inline struct eventfs_inode *init_ei(struct eventfs_inode *ei, const char if (!ei->name) return NULL; kref_init(&ei->kref); + INIT_LIST_HEAD(&ei->children); + INIT_LIST_HEAD(&ei->list); return ei; } @@ -753,8 +755,6 @@ struct eventfs_inode *eventfs_create_dir(const char *name, struct eventfs_inode ei->entries = entries; ei->nr_entries = size; ei->data = data; - INIT_LIST_HEAD(&ei->children); - INIT_LIST_HEAD(&ei->list); mutex_lock(&eventfs_mutex); if (!parent->is_freed) @@ -826,9 +826,6 @@ struct eventfs_inode *eventfs_create_events_dir(const char *name, struct dentry ei->attr.uid = uid; ei->attr.gid = gid; - INIT_LIST_HEAD(&ei->children); - INIT_LIST_HEAD(&ei->list); - ti = get_tracefs(inode); ti->flags |= TRACEFS_EVENT_INODE; ti->private = ei; -- 2.56.0 _______________________________________________ Devel mailing list Devel@openvz.org https://lists.openvz.org/mailman/listinfo/devel