From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 8EF6024E008 for ; Thu, 17 Apr 2025 13:45:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1744897500; cv=none; b=MByuFa6lhoVEwKfSZvy11vb+J2jsUaxRMXBL2VlmoC7gT5bN0EhTBp8VVp66xg352EuS6CNjAjfszl6ezIXE/DByGNA5IcOYd7kodVV5PwPsDO/8ylg4B2qjzbPWq/hrHxKKZ+5GerzOUyg/uxL0qvzf5g+ZpbPV+cDJqPKxjBw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1744897500; c=relaxed/simple; bh=jfirlER1sYea/Ze6c/RAN4gdDpesUJWEwBynmAVuWZA=; h=Subject:To:Cc:From:Date:Message-ID:MIME-Version:Content-Type; b=AMmkXxJXPv/O3pqxlueyc8tlt9zx0Y21xZXz3GljnBE3E8oKVCsepRBt8d0BJLi2j1uY7tjDPnZJsZE6/IY9JZSi/6ldDytQJGFMZNYG29KpSKBs9PM2xLHnxAqasrlIe/lxtpex5yck03BTgRCZBKkDgX6km4lg1JQoB6C/BdA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=gQQOmJnu; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="gQQOmJnu" Received: by smtp.kernel.org (Postfix) with ESMTPSA id F0FA4C4CEEA; Thu, 17 Apr 2025 13:44:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1744897500; bh=jfirlER1sYea/Ze6c/RAN4gdDpesUJWEwBynmAVuWZA=; h=Subject:To:Cc:From:Date:From; b=gQQOmJnu71m3wVf315SLWdYG9ZosD9wVae4sX3jY2FIJ9gdKJLcLl7Taw1hiqd8Qn WLiTScy6Kxy2wLOke8/Z1JquaI0o5Rqkh/WQkZf9UrtP9VGvsOJqy/jTjb5OsJxWbz n4DNt6Jkg6g5vUcN/8CDQ6hbn6FAwR1Do8OPeJvw= Subject: FAILED: patch "[PATCH] misc: pci_endpoint_test: Avoid issue of interrupts remaining" failed to apply to 5.4-stable tree To: hayashi.kunihiko@socionext.com,kwilczynski@kernel.org,manivannan.sadhasivam@linaro.org Cc: From: Date: Thu, 17 Apr 2025 15:40:41 +0200 Message-ID: <2025041741-erased-babbling-f827@gregkh> Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The patch below does not apply to the 5.4-stable tree. If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to . To reproduce the conflict and resubmit, you may use the following commands: git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-5.4.y git checkout FETCH_HEAD git cherry-pick -x f6cb7828c8e17520d4f5afb416515d3fae1af9a9 # git commit -s git send-email --to '' --in-reply-to '2025041741-erased-babbling-f827@gregkh' --subject-prefix 'PATCH 5.4.y' HEAD^.. Possible dependencies: thanks, greg k-h ------------------ original commit in Linus's tree ------------------ >From f6cb7828c8e17520d4f5afb416515d3fae1af9a9 Mon Sep 17 00:00:00 2001 From: Kunihiko Hayashi Date: Tue, 25 Feb 2025 20:02:48 +0900 Subject: [PATCH] misc: pci_endpoint_test: Avoid issue of interrupts remaining after request_irq error MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit After devm_request_irq() fails with error in pci_endpoint_test_request_irq(), the pci_endpoint_test_free_irq_vectors() is called assuming that all IRQs have been released. However, some requested IRQs remain unreleased, so there are still /proc/irq/* entries remaining, and this results in WARN() with the following message: remove_proc_entry: removing non-empty directory 'irq/30', leaking at least 'pci-endpoint-test.0' WARNING: CPU: 0 PID: 202 at fs/proc/generic.c:719 remove_proc_entry +0x190/0x19c To solve this issue, set the number of remaining IRQs to test->num_irqs, and release IRQs in advance by calling pci_endpoint_test_release_irq(). Cc: stable@vger.kernel.org Fixes: e03327122e2c ("pci_endpoint_test: Add 2 ioctl commands") Reviewed-by: Manivannan Sadhasivam Signed-off-by: Kunihiko Hayashi Link: https://lore.kernel.org/r/20250225110252.28866-3-hayashi.kunihiko@socionext.com [kwilczynski: commit log] Signed-off-by: Krzysztof WilczyƄski diff --git a/drivers/misc/pci_endpoint_test.c b/drivers/misc/pci_endpoint_test.c index a3d2caa7a6bb..9e56d200d2f0 100644 --- a/drivers/misc/pci_endpoint_test.c +++ b/drivers/misc/pci_endpoint_test.c @@ -259,6 +259,9 @@ static int pci_endpoint_test_request_irq(struct pci_endpoint_test *test) break; } + test->num_irqs = i; + pci_endpoint_test_release_irq(test); + return ret; }