lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20180322195819.24271-2-willy@infradead.org>
Date:   Thu, 22 Mar 2018 12:58:16 -0700
From:   Matthew Wilcox <willy@...radead.org>
To:     linux-mm@...ck.org
Cc:     Kirill Tkhai <ktkhai@...tuozzo.com>,
        Matthew Wilcox <mawilcox@...rosoft.com>,
        linux-kernel@...r.kernel.org,
        "Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>
Subject: [PATCH 1/4] decompression: Rename malloc and free

From: Matthew Wilcox <mawilcox@...rosoft.com>

Rename the trivial malloc and free implementations to tmalloc and tfree
to avoid a namespace collision with an in-kernel free() function.

Signed-off-by: Matthew Wilcox <mawilcox@...rosoft.com>
---
 include/linux/decompress/mm.h | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/include/linux/decompress/mm.h b/include/linux/decompress/mm.h
index 868e9eacd69e..0ac62b025c1b 100644
--- a/include/linux/decompress/mm.h
+++ b/include/linux/decompress/mm.h
@@ -31,7 +31,7 @@
 STATIC_RW_DATA unsigned long malloc_ptr;
 STATIC_RW_DATA int malloc_count;
 
-static void *malloc(int size)
+static void *tmalloc(int size)
 {
 	void *p;
 
@@ -52,15 +52,17 @@ static void *malloc(int size)
 	return p;
 }
 
-static void free(void *where)
+static void tfree(void *where)
 {
 	malloc_count--;
 	if (!malloc_count)
 		malloc_ptr = free_mem_ptr;
 }
 
-#define large_malloc(a) malloc(a)
-#define large_free(a) free(a)
+#define malloc(a) tmalloc(a)
+#define free(a) tfree(a)
+#define large_malloc(a) tmalloc(a)
+#define large_free(a) tfree(a)
 
 #define INIT
 
-- 
2.16.2

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ