On Fri, Aug 30, 2024 at 3:12 PM Nathan Chancellor nathan@kernel.org wrote:
Hi Greg and Sasha,
On Tue, Aug 27, 2024 at 04:37:41PM +0200, Greg Kroah-Hartman wrote:
6.6-stable review patch. If anyone has any objections, please let me know.
From: Suren Baghdasaryan surenb@google.com
[ Upstream commit 8a2f11878771da65b8ac135c73b47dae13afbd62 ]
After redefining alloc_pages, all uses of that name are being replaced. Change the conflicting names to prevent preprocessor from replacing them when it's not intended.
Link: https://lkml.kernel.org/r/20240321163705.3067592-18-surenb@google.com Signed-off-by: Suren Baghdasaryan surenb@google.com Tested-by: Kees Cook keescook@chromium.org Cc: Alexander Viro viro@zeniv.linux.org.uk Cc: Alex Gaynor alex.gaynor@gmail.com Cc: Alice Ryhl aliceryhl@google.com Cc: Andreas Hindborg a.hindborg@samsung.com Cc: Benno Lossin benno.lossin@proton.me Cc: "Björn Roy Baron" bjorn3_gh@protonmail.com Cc: Boqun Feng boqun.feng@gmail.com Cc: Christoph Lameter cl@linux.com Cc: Dennis Zhou dennis@kernel.org Cc: Gary Guo gary@garyguo.net Cc: Kent Overstreet kent.overstreet@linux.dev Cc: Miguel Ojeda ojeda@kernel.org Cc: Pasha Tatashin pasha.tatashin@soleen.com Cc: Peter Zijlstra peterz@infradead.org Cc: Tejun Heo tj@kernel.org Cc: Vlastimil Babka vbabka@suse.cz Cc: Wedson Almeida Filho wedsonaf@gmail.com Signed-off-by: Andrew Morton akpm@linux-foundation.org Stable-dep-of: 61ebe5a747da ("mm/vmalloc: fix page mapping if vm_area_alloc_pages() with high order fallback to order 0") Signed-off-by: Sasha Levin sashal@kernel.org
arch/alpha/kernel/pci_iommu.c | 2 +- arch/mips/jazz/jazzdma.c | 2 +- arch/powerpc/kernel/dma-iommu.c | 2 +- arch/powerpc/platforms/ps3/system-bus.c | 4 ++-- arch/powerpc/platforms/pseries/vio.c | 2 +- arch/x86/kernel/amd_gart_64.c | 2 +- drivers/iommu/dma-iommu.c | 2 +- drivers/parisc/ccio-dma.c | 2 +- drivers/parisc/sba_iommu.c | 2 +- drivers/xen/grant-dma-ops.c | 2 +- drivers/xen/swiotlb-xen.c | 2 +- include/linux/dma-map-ops.h | 2 +- kernel/dma/mapping.c | 4 ++-- 13 files changed, 15 insertions(+), 15 deletions(-)
This patch breaks the build for s390:
arch/s390/pci/pci_dma.c:724:10: error: 'const struct dma_map_ops' has no member named 'alloc_pages'; did you mean 'alloc_pages_op'? 724 | .alloc_pages = dma_common_alloc_pages, | ^~~~~~~~~~~ | alloc_pages_op
https://storage.tuxsuite.com/public/clangbuiltlinux/continuous-integration2/...
This change happened after commit c76c067e488c ("s390/pci: Use dma-iommu layer") in mainline, which explains how it was missed for stable.
The fix seems simple:
diff --git a/arch/s390/pci/pci_dma.c b/arch/s390/pci/pci_dma.c index 99209085c75b..ce0f2990cb04 100644 --- a/arch/s390/pci/pci_dma.c +++ b/arch/s390/pci/pci_dma.c @@ -721,7 +721,7 @@ const struct dma_map_ops s390_pci_dma_ops = { .unmap_page = s390_dma_unmap_pages, .mmap = dma_common_mmap, .get_sgtable = dma_common_get_sgtable,
.alloc_pages = dma_common_alloc_pages,
.alloc_pages_op = dma_common_alloc_pages, .free_pages = dma_common_free_pages, /* dma_supported is unconditionally true without a callback */
};
but I think the better question is why this patch is even needed in the first place? It claims that it is a stable dependency of 61ebe5a747da but this patch does not even touch mm/vmalloc.c and 61ebe5a747da does not mention or touch anything with alloc_pages_op, so it seems like this change should just be reverted from 6.6?
Hmm, Nathan is right. I don't see any dependency between this patch and 61ebe5a747da. Maybe some other patch that uses .alloc_pages_op got backported and that caused a dependency but then that other patch should be changed to use .alloc_pages. I'm syncing stable 6.6 to check. Thanks for pointing this out Nathan!
Cheers, Nathan