From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id EA19637C92C; Mon, 31 Aug 2026 19:47:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788205653; cv=none; b=EQKRo1R8iMMzEbf4+rw9145qT3D1WLwWdFX7RrWGGsTs7JPLakZMFRrUZCEvD2XndVkCOu2Vf172btccKn6Z6QvzMIB6qlKupvplkwrQvBkSXc4rB8RXAKL/LT1h5LGYoYKkuIKgSW/a6/KJyDaliSdevEYh4izk0JqAuLr94Cc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788205653; c=relaxed/simple; bh=SgZ1tKyiapKGe9W/adgY8AEsNYTkoXnv+2T/9xtbDLg=; h=From:Subject:To:Cc:In-Reply-To:References:Content-Type:Date: Message-Id; b=tinWzJzGfTyAQbCd7Oma6XVa6XN5m27kqw2nNni+Dx8ROstUyU/KMk99+Etque44hwDvI9BRBT5StQE7xk/G7w8ZqH7jIkJNL+rbau3JjhqAfsRT3X7N2duauLtycpeDlXSGXFDED8SSFab70QcsKhkz21wB0d1B3aH66IUx+XQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=DcGDkLZL; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="DcGDkLZL" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 267351F000E9; Mon, 31 Aug 2026 19:47:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1788205651; bh=fg1m2tqKVdr9D4lPJddurpwGty/VebMjmG3gchTqpoo=; h=From:Subject:Reply-To:To:Cc:In-Reply-To:References:Date; b=DcGDkLZLkj4GwR3A9Rqoa4yAfb0F8goJeEYa/b0CkknzqRj81HOJHrdYfVHXu47E0 TtvfHeNl0OIJfzv0Dr2SAI9k/FGJyQZKq1ja4ks7tBkWZMezQYlKlivN176wLvOjA1 iGAn7kyx94WU/CkzLp4/ogYOl5hFKYTNAQPOWAdHpWdebAoiXgu0/via6Ykj25fXOn sPjLLxWPFYY+kiWrVH/E8YwhPFJbP00SlAttYh6v2WdNGE39BIUZs26bCWxAOTWcQT 8XyBzQZTZsK/VFBGYONvPMzmBDcOB9pf7VRpkuG0+AlGPrjM8CNzgrXOxIy3V6TRdb rXkKUuXm+V+lg== From: sashiko-bot@kernel.org Subject: Re: [PATCH v5 2/4] s390/vfio-ap: Fix failure to release IRQ notification eventfd contexts Reply-To: sashiko-reviews@lists.linux.dev To: "Anthony Krowiak" Cc: "Vasily Gorbik" , kvm@vger.kernel.org, "Heiko Carstens" , "Alexander Gordeev" , linux-s390@vger.kernel.org, "Christian Borntraeger" In-Reply-To: <20260831171443.222225-3-akrowiak@linux.ibm.com> References: <20260831171443.222225-1-akrowiak@linux.ibm.com> <20260831171443.222225-3-akrowiak@linux.ibm.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Mon, 31 Aug 2026 19:47:30 +0000 Message-Id: <20260831194731.267351F000E9@smtp.kernel.org> Precedence: bulk X-Mailing-List: linux-s390@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: > When userspace registers IRQ notification eventfds via the > VFIO_DEVICE_SET_IRQS ioctl, vfio_ap_set_request_irq() and > vfio_ap_set_cfg_change_irq() each call eventfd_ctx_fdget(), which > takes a reference on the eventfd_ctx and stores it in > matrix_mdev->req_trigger and matrix_mdev->cfg_chg_trigger > respectively. >=20 > These references are dropped only when userspace explicitly replaces > or clears them via a subsequent SET_IRQS call. If the device is > closed without that explicit teardown - because the guest exits, > the VM process crashes, or the device file is simply closed - > neither vfio_ap_mdev_close_device() nor the remove path releases > these references. The eventfd_ctx backing objects and their > associated file references therefore leak for the lifetime of the > kernel. > [ ... ] > releasing the device file before invoking close_device(). >=20 > Fixes: bf48961f6f48e ("s390/vfio-ap: realize the VFIO_DEVICE_SET_IRQS ioc= tl") > Cc: stable@vger.kernel.org > Signed-off-by: Anthony Krowiak Sashiko has reviewed this patch and found no issues. It looks great! --=20 Sashiko AI review =C2=B7 https://sashiko.dev/#/patchset/20260831171443.2222= 25-1-akrowiak@linux.ibm.com?part=3D2