svn commit: r356282 - stable/12/sys/dev/xdma

Ian Lepore ian at FreeBSD.org
Thu Jan 2 19:52:01 UTC 2020


Author: ian
Date: Thu Jan  2 19:52:01 2020
New Revision: 356282
URL: https://svnweb.freebsd.org/changeset/base/356282

Log:
  MFC r347828 (by cem):
  
  xdma(4): Fix invalid pointer use (breaks arm.SOCFPGA build)
  
  In xdma_handle_mem_node(), vmem_size_t and vmem_addr_t pointers were passed to
  an FDT API that emits u_long values to the output parameter pointer.  This
  broke on systems with both xdma and 32-bit vmem size/addr types (SOCFPGA).
  
  Reported by:	tinderbox
  Sponsored by:	Dell EMC Isilon

Modified:
  stable/12/sys/dev/xdma/xdma.c
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/sys/dev/xdma/xdma.c
==============================================================================
--- stable/12/sys/dev/xdma/xdma.c	Thu Jan  2 19:29:14 2020	(r356281)
+++ stable/12/sys/dev/xdma/xdma.c	Thu Jan  2 19:52:01 2020	(r356282)
@@ -312,8 +312,7 @@ xdma_handle_mem_node(vmem_t *vmem, phandle_t memory)
 	pcell_t *regp;
 	int addr_cells, size_cells;
 	int i, reg_len, ret, tuple_size, tuples;
-	vmem_addr_t mem_start;
-	vmem_size_t mem_size;
+	u_long mem_start, mem_size;
 
 	if ((ret = fdt_addrsize_cells(OF_parent(memory), &addr_cells,
 	    &size_cells)) != 0)


More information about the svn-src-all mailing list