From: Pekka Enberg Date: Sun, 31 May 2009 10:50:38 +0000 (+0300) Subject: slab: document kzfree() zeroing behavior X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=a234bdc9aecc299ba41ffe8023b3ea110df9f51b;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git slab: document kzfree() zeroing behavior As suggested by Alan Cox, document the fact that kzfree() can zero out a great deal more memory than the what the user requested from kmalloc(). Cc: Alan Cox Signed-off-by: Pekka Enberg --- diff --git a/mm/util.c b/mm/util.c index 55bef160b9f1..e79572b3684c 100644 --- a/mm/util.c +++ b/mm/util.c @@ -166,6 +166,10 @@ EXPORT_SYMBOL(krealloc); * * The memory of the object @p points to is zeroed before freed. * If @p is %NULL, kzfree() does nothing. + * + * Note: this function zeroes the whole allocated buffer which can be a good + * deal bigger than the requested buffer size passed to kmalloc(). So be + * careful when using this function in performance sensitive code. */ void kzfree(const void *p) {