* [PATCH] pcmcia: rsrc_nonstatic: fix invalid iounmap warning on card insertion
@ 2026-11-04 19:15 Luc Bertho
0 siblings, 0 replies; only message in thread
From: Luc Bertho @ 2026-11-04 19:15 UTC (permalink / raw)
To: linux; +Cc: linux-kernel, Luc Bertho
When inserting a CompactFlash card via a PCMCIA adapter on a Dell Latitude,
the pccardd daemon triggers a WARNING in iounmap() on recent kernels
(>= 6.12) because it attempts to unmap an address that may have already
been released or tracking context has shifted.
Fix this by explicitly checking if s->cis_virt is valid before invoking
iounmap().
Signed-off-by: Luc Bertho <luc.bertho.kernel@gmail.com>
---
--- a/drivers/pcmcia/rsrc_nonstatic.c
+++ b/drivers/pcmcia/rsrc_nonstatic.c
@@ -279,8 +279,10 @@
ret = s->callback->validate(s, count);
/* invalidate mapping */
mutex_lock(&s->ops_mutex);
- iounmap(s->cis_virt);
- s->cis_virt = NULL;
+ if (s->cis_virt) {
+ iounmap(s->cis_virt);
+ s->cis_virt = NULL;
+ }
}
s->cis_mem.res = NULL;
if ((ret) || (*count == 0))
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2026-11-04 19:15 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-04 19:15 [PATCH] pcmcia: rsrc_nonstatic: fix invalid iounmap warning on card insertion Luc Bertho
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®