Patch "swiotlb: fix debugfs reporting of reserved memory pools" has been added to the 6.1-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

    swiotlb: fix debugfs reporting of reserved memory pools

to the 6.1-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:
     swiotlb-fix-debugfs-reporting-of-reserved-memory-poo.patch
and it can be found in the queue-6.1 subdirectory.

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



commit ffaba95d00564bf54db3c5bec05d2ce3642dcc49
Author: Michael Kelley <mikelley@xxxxxxxxxxxxx>
Date:   Thu Apr 13 08:37:30 2023 -0700

    swiotlb: fix debugfs reporting of reserved memory pools
    
    [ Upstream commit 5499d01c029069044a3b3e50501c77b474c96178 ]
    
    For io_tlb_nslabs, the debugfs code reports the correct value for a
    specific reserved memory pool.  But for io_tlb_used, the value reported
    is always for the default pool, not the specific reserved pool. Fix this.
    
    Fixes: 5c850d31880e ("swiotlb: fix passing local variable to debugfs_create_ulong()")
    Signed-off-by: Michael Kelley <mikelley@xxxxxxxxxxxxx>
    Signed-off-by: Christoph Hellwig <hch@xxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/kernel/dma/swiotlb.c b/kernel/dma/swiotlb.c
index bf1ed08ec541f..7f4ad5e70b40c 100644
--- a/kernel/dma/swiotlb.c
+++ b/kernel/dma/swiotlb.c
@@ -919,7 +919,9 @@ EXPORT_SYMBOL_GPL(is_swiotlb_active);
 
 static int io_tlb_used_get(void *data, u64 *val)
 {
-	*val = mem_used(&io_tlb_default_mem);
+	struct io_tlb_mem *mem = data;
+
+	*val = mem_used(mem);
 	return 0;
 }
 DEFINE_DEBUGFS_ATTRIBUTE(fops_io_tlb_used, io_tlb_used_get, NULL, "%llu\n");
@@ -932,7 +934,7 @@ static void swiotlb_create_debugfs_files(struct io_tlb_mem *mem,
 		return;
 
 	debugfs_create_ulong("io_tlb_nslabs", 0400, mem->debugfs, &mem->nslabs);
-	debugfs_create_file("io_tlb_used", 0400, mem->debugfs, NULL,
+	debugfs_create_file("io_tlb_used", 0400, mem->debugfs, mem,
 			&fops_io_tlb_used);
 }
 



[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