From: Sasha Levin <sashal@kernel.org>
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: Zheyu Ma <zheyuma97@gmail.com>,
Hans Verkuil <hverkuil-cisco@xs4all.nl>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
Sasha Levin <sashal@kernel.org>,
linux-media@vger.kernel.org
Subject: [PATCH AUTOSEL 5.18 053/159] media: cx25821: Fix the warning when removing the module
Date: Mon, 30 May 2022 09:22:38 -0400 [thread overview]
Message-ID: <20220530132425.1929512-53-sashal@kernel.org> (raw)
In-Reply-To: <20220530132425.1929512-1-sashal@kernel.org>
From: Zheyu Ma <zheyuma97@gmail.com>
[ Upstream commit 2203436a4d24302871617373a7eb21bc17e38762 ]
When removing the module, we will get the following warning:
[ 14.746697] remove_proc_entry: removing non-empty directory 'irq/21', leaking at least 'cx25821[1]'
[ 14.747449] WARNING: CPU: 4 PID: 368 at fs/proc/generic.c:717 remove_proc_entry+0x389/0x3f0
[ 14.751611] RIP: 0010:remove_proc_entry+0x389/0x3f0
[ 14.759589] Call Trace:
[ 14.759792] <TASK>
[ 14.759975] unregister_irq_proc+0x14c/0x170
[ 14.760340] irq_free_descs+0x94/0xe0
[ 14.760640] mp_unmap_irq+0xb6/0x100
[ 14.760937] acpi_unregister_gsi_ioapic+0x27/0x40
[ 14.761334] acpi_pci_irq_disable+0x1d3/0x320
[ 14.761688] pci_disable_device+0x1ad/0x380
[ 14.762027] ? _raw_spin_unlock_irqrestore+0x2d/0x60
[ 14.762442] ? cx25821_shutdown+0x20/0x9f0 [cx25821]
[ 14.762848] cx25821_finidev+0x48/0xc0 [cx25821]
[ 14.763242] pci_device_remove+0x92/0x240
Fix this by freeing the irq before call pci_disable_device().
Signed-off-by: Zheyu Ma <zheyuma97@gmail.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/media/pci/cx25821/cx25821-core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/media/pci/cx25821/cx25821-core.c b/drivers/media/pci/cx25821/cx25821-core.c
index 3078a39f0b95..6627fa9166d3 100644
--- a/drivers/media/pci/cx25821/cx25821-core.c
+++ b/drivers/media/pci/cx25821/cx25821-core.c
@@ -1332,11 +1332,11 @@ static void cx25821_finidev(struct pci_dev *pci_dev)
struct cx25821_dev *dev = get_cx25821(v4l2_dev);
cx25821_shutdown(dev);
- pci_disable_device(pci_dev);
/* unregister stuff */
if (pci_dev->irq)
free_irq(pci_dev->irq, dev);
+ pci_disable_device(pci_dev);
cx25821_dev_unregister(dev);
v4l2_device_unregister(v4l2_dev);
--
2.35.1
next prev parent reply other threads:[~2022-05-30 13:31 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20220530132425.1929512-1-sashal@kernel.org>
2022-05-30 13:22 ` [PATCH AUTOSEL 5.18 048/159] media: Revert "media: dw9768: activate runtime PM and turn off device" Sasha Levin
2022-05-30 13:22 ` [PATCH AUTOSEL 5.18 049/159] media: i2c: dw9714: Disable the regulator when the driver fails to probe Sasha Levin
2022-05-30 13:22 ` [PATCH AUTOSEL 5.18 050/159] media: venus: hfi: avoid null dereference in deinit Sasha Levin
2022-05-30 13:22 ` [PATCH AUTOSEL 5.18 051/159] media: venus: do not queue internal buffers from previous sequence Sasha Levin
2022-05-30 13:22 ` [PATCH AUTOSEL 5.18 052/159] media: pci: cx23885: Fix the error handling in cx23885_initdev() Sasha Levin
2022-05-30 13:22 ` Sasha Levin [this message]
2022-05-30 13:23 ` [PATCH AUTOSEL 5.18 112/159] media: rga: fix possible memory leak in rga_probe Sasha Levin
2022-05-30 13:23 ` [PATCH AUTOSEL 5.18 113/159] media: coda: limit frame interval enumeration to supported encoder frame sizes Sasha Levin
2022-05-30 13:23 ` [PATCH AUTOSEL 5.18 114/159] media: hantro: HEVC: unconditionnaly set pps_{cb/cr}_qp_offset values Sasha Levin
2022-05-30 13:23 ` [PATCH AUTOSEL 5.18 115/159] media: ccs-core.c: fix failure to call clk_disable_unprepare Sasha Levin
2022-05-30 13:23 ` [PATCH AUTOSEL 5.18 116/159] media: imon: reorganize serialization Sasha Levin
2022-05-30 13:23 ` [PATCH AUTOSEL 5.18 117/159] media: cec-adap.c: fix is_configuring state Sasha Levin
2022-05-30 13:23 ` [PATCH AUTOSEL 5.18 123/159] media: mediatek: vcodec: prevent kernel crash when rmmod mtk-vcodec-dec.ko Sasha Levin
2022-05-30 13:24 ` [PATCH AUTOSEL 5.18 135/159] media: exynos4-is: Fix compile warning Sasha Levin
2022-05-30 13:24 ` [PATCH AUTOSEL 5.18 136/159] media: hantro: Stop using H.264 parameter pic_num Sasha Levin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220530132425.1929512-53-sashal@kernel.org \
--to=sashal@kernel.org \
--cc=hverkuil-cisco@xs4all.nl \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=stable@vger.kernel.org \
--cc=zheyuma97@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).