[PATCH] Fix numa_alloc_local() segfault in 2.0.0

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

 



numa_alloc_local passes a NULL bitmap do dombind, so it shouldn't
reference it. This fixes numademo.

BTW Cliff could you please add your email address to the READMEs
etc.? And perhaps remove "ak@xxxxxxx" Still seems to be my old invalid address 
in there everywhere.

-Andi

--- numactl-2.0.0/libnuma.c-o	2008-06-06 15:32:13.000000000 +0200
+++ numactl-2.0.0/libnuma.c	2008-06-06 15:33:52.000000000 +0200
@@ -271,7 +271,8 @@
 
 static void dombind(void *mem, size_t size, int pol, struct bitmask *bmp)
 { 
-	if (mbind(mem, size, pol, bmp->maskp, bmp->size, mbind_flags) < 0)
+	if (mbind(mem, size, pol, bmp ? bmp->maskp : NULL, bmp ? bmp->size : 0, 
+		  mbind_flags) < 0)
 		numa_error("mbind"); 
 } 
 
--
To unsubscribe from this list: send the line "unsubscribe linux-numa" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]     [Devices]

  Powered by Linux