From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pf1-f201.google.com (mail-pf1-f201.google.com [209.85.210.201]) (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 589B839A078 for ; Thu, 9 Jul 2026 16:52:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783615964; cv=none; b=aQEnZ0U7IAXgprkoO8k4EGCcdFWFjmGDk9OzY2kgYEPnoINYMVy2AaapKCAtrM+vF6hMgeqI9gCjF4VtFbT84Mhh4ZIvJ5q5WYJu/wbECS7r3yEq9dT+iFbrHK4Y8TeJOemOGH7+3txAPFWUWvu/qs9dGcrzzTWr4yKcLy9aoHo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783615964; c=relaxed/simple; bh=9yWW1rfG08mjiXMbiWWD8T4F5l3PF0vkB9a41Sif8zU=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=CemHxJr/6BnDViaI8oJkiUZCITGWV8aD+6NH4L9ekydT6KeqlBNw/3NZqXDdKs98HE31EaJ+1r7l9l0KRRgSsNnOaclXjmVJXIcwck04+/2xiakHh2gZr/WNpkcSjFINBtIIL3Ll0uVw/hyPC0ACa2JYqbrWMbmMOvwWpniycKE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--seanjc.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=lM9eAaPS; arc=none smtp.client-ip=209.85.210.201 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--seanjc.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="lM9eAaPS" Received: by mail-pf1-f201.google.com with SMTP id d2e1a72fcca58-845317fa7e6so3471835b3a.3 for ; Thu, 09 Jul 2026 09:52:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20251104; t=1783615963; x=1784220763; darn=vger.kernel.org; h=content-type:cc:to:from:subject:message-id:references:mime-version :in-reply-to:date:from:to:cc:subject:date:message-id:reply-to :content-type; bh=9yWW1rfG08mjiXMbiWWD8T4F5l3PF0vkB9a41Sif8zU=; b=lM9eAaPSAUO8NOnP/ETwgdNPptS04u/KjkY5uVRaYiN6uwG/MDPodKzStiZofuY0v2 coJ7yl/39Mm+FKHrGM9kB/h4buHweXpn3Ut4TwQJBwmZES0evVm1/RbYtTtNABfeHWvN IykzNgjjVbOZihZ6Pm6zo/H2wCXmEwwd+fOx+mwkKSkcPijaifqVZLfHdrxVWTrk8k6K PrUUpgl2fYnMI7lDimGD5N2pSYHgB4/xWNFvyItP/K3OZS6YALmpKj/MZpcbSHJDBpEM k7Vp37F3jl7mevBK3qsoh5mX5i9TQk5Bsf0eeWlnPlBjUbCOTt37PnjblvoJmm75BmX3 WEEA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1783615963; x=1784220763; h=content-type:cc:to:from:subject:message-id:references:mime-version :in-reply-to:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=9yWW1rfG08mjiXMbiWWD8T4F5l3PF0vkB9a41Sif8zU=; b=dZWgJIdMinzsxPwIV0T3okgrbPtt1cX3KEs5EBh/PoCM8XunjiBYa/zoLPbOsM8NqW boh/FhVn0W9GgpjELRw+dCy/zzO7NavZZktl45Ldagp0tVTa9CwCm6qPPFxH/btkaIne LQvWo6ITPlX+10rTurE2Lt29sFbPSQ4fWc6uBhGuPDdJWf/p4MtU8Uiw/9ZjmnIcHPBl 7JfzzUVavbfrBOBBv5eQc+7R7iMNkloSljy1RKQM6Iwz9vHY/+4LUe2pgG2m68Jk6aoF akes5y0EJORsc5x9ojiet0ZS3qgffLSu1xpHtYq5iw/UKDitj1qH6FYeAee3mUNoya+z nilQ== X-Forwarded-Encrypted: i=1; AHgh+Rpx7Qvmu4xwtwl6td62WNgVMeOT52z+ZF5iahG8esx8zvkBDAh2qyEbOvMLqQo+HEaPAvgH51gFU3LrJek=@vger.kernel.org X-Gm-Message-State: AOJu0YyNqy5e3MhZROwUWMeng1aFgujH1m7fjUTe7t7pDqJpjKTBsge5 nFhoOe8AgBLVgXpEkLF6pvbkp11NOefZFVCYu9/ufl3yc74t6VszACLemWurd2ccyrXDzUtDPdc 703zR8g== X-Received: from pfbjo13.prod.google.com ([2002:a05:6a00:908d:b0:845:e4c9:a310]) (user=seanjc job=prod-delivery.src-stubby-dispatcher) by 2002:a05:6a00:3d06:b0:845:36a0:9eb2 with SMTP id d2e1a72fcca58-84842f5bd85mr7668383b3a.34.1783615962518; Thu, 09 Jul 2026 09:52:42 -0700 (PDT) Date: Thu, 9 Jul 2026 09:52:41 -0700 In-Reply-To: <20260709152154.235233-1-seiden@linux.ibm.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20260709152154.235233-1-seiden@linux.ibm.com> Message-ID: Subject: Re: [PATCH] KVM: Add missing debugfs cleanup in kvm_init error path From: Sean Christopherson To: Steffen Eiden Cc: kvm@vger.kernel.org, linux-kernel@vger.kernel.org, Paolo Bonzini Content-Type: text/plain; charset="us-ascii" On Thu, Jul 09, 2026, Steffen Eiden wrote: > If any initialization after kvm_init_debug() fails the cleanup code did > not remove the debugfs entries. Therefore, the corresponding debugfs > entries where still alive but the backing fops are already freed, > creating a use-after-free scenario. Fix this by removing the debugfs > entries if vfio init fails. Already posted, and applied locally on my end. https://lore.kernel.org/all/20260706095910.39798-1-leixiang%40kylinos.cn