From: Vegard Nossum Date: Thu, 26 Feb 2009 08:55:52 +0000 (+0100) Subject: crypto: don't track xor test pages with kmemcheck X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=33f65df7ed1abcaac32ba620b9976a4d8cea3248;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git crypto: don't track xor test pages with kmemcheck The xor tests are run on uninitialized data, because it is doesn't really matter what the underlying data is. Annotate this false- positive warning. Acked-by: Pekka Enberg Signed-off-by: Vegard Nossum --- diff --git a/crypto/xor.c b/crypto/xor.c index 996b6ee57d9e..fc5b836f3430 100644 --- a/crypto/xor.c +++ b/crypto/xor.c @@ -101,7 +101,12 @@ calibrate_xor_blocks(void) void *b1, *b2; struct xor_block_template *f, *fastest; - b1 = (void *) __get_free_pages(GFP_KERNEL, 2); + /* + * Note: Since the memory is not actually used for _anything_ but to + * test the XOR speed, we don't really want kmemcheck to warn about + * reading uninitialized bytes here. + */ + b1 = (void *) __get_free_pages(GFP_KERNEL | __GFP_NOTRACK, 2); if (!b1) { printk(KERN_WARNING "xor: Yikes! No memory available.\n"); return -ENOMEM;