Patch "pci_iounmap(): Fix MMIO mapping leak" has been added to the 6.7-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    pci_iounmap(): Fix MMIO mapping leak

to the 6.7-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     pci_iounmap-fix-mmio-mapping-leak.patch
and it can be found in the queue-6.7 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit c6235f1ccf2d16e80420b5d6c6452ee83a39310d
Author: Philipp Stanner <pstanner@xxxxxxxxxx>
Date:   Wed Jan 31 10:00:20 2024 +0100

    pci_iounmap(): Fix MMIO mapping leak
    
    [ Upstream commit 7626913652cc786c238e2dd7d8740b17d41b2637 ]
    
    The #ifdef ARCH_HAS_GENERIC_IOPORT_MAP accidentally also guards iounmap(),
    which means MMIO mappings are leaked.
    
    Move the guard so we call iounmap() for MMIO mappings.
    
    Fixes: 316e8d79a095 ("pci_iounmap'2: Electric Boogaloo: try to make sense of it all")
    Link: https://lore.kernel.org/r/20240131090023.12331-2-pstanner@xxxxxxxxxx
    Reported-by: Danilo Krummrich <dakr@xxxxxxxxxx>
    Suggested-by: Arnd Bergmann <arnd@xxxxxxxxxx>
    Signed-off-by: Philipp Stanner <pstanner@xxxxxxxxxx>
    Signed-off-by: Bjorn Helgaas <bhelgaas@xxxxxxxxxx>
    Reviewed-by: Arnd Bergmann <arnd@xxxxxxxx>
    Cc: <stable@xxxxxxxxxxxxxxx> # v5.15+
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/lib/pci_iomap.c b/lib/pci_iomap.c
index ce39ce9f3526e..2829ddb0e316b 100644
--- a/lib/pci_iomap.c
+++ b/lib/pci_iomap.c
@@ -170,8 +170,8 @@ void pci_iounmap(struct pci_dev *dev, void __iomem *p)
 
 	if (addr >= start && addr < start + IO_SPACE_LIMIT)
 		return;
-	iounmap(p);
 #endif
+	iounmap(p);
 }
 EXPORT_SYMBOL(pci_iounmap);
 




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux