MODSIGN: linux/string.h should be #included to get memcpy()
authorDavid Howells <dhowells@redhat.com>
Tue, 1 Mar 2016 10:36:07 +0000 (10:36 +0000)
committerDavid Howells <dhowells@redhat.com>
Tue, 1 Mar 2016 10:36:07 +0000 (10:36 +0000)
linux/string.h should be #included in module_signing.c to get memcpy(),
lest the following occur:

    kernel/module_signing.c: In function 'mod_verify_sig':
    kernel/module_signing.c:57:2: error: implicit declaration of function 'memcpy' [-Werror=implicit-function-declaration]
      memcpy(&ms, mod + (modlen - sizeof(ms)), sizeof(ms));
      ^

Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: David Howells <dhowells@redhat.com>
kernel/module_signing.c

index 6528a79..9cfa46d 100644 (file)
@@ -11,6 +11,7 @@
 
 #include <linux/kernel.h>
 #include <linux/errno.h>
+#include <linux/string.h>
 #include <keys/system_keyring.h>
 #include <crypto/public_key.h>
 #include "module-internal.h"