Skip to content

Commit

Permalink
security/keys: make big_key.c explicitly non-modular
Browse files Browse the repository at this point in the history
The Kconfig currently controlling compilation of this code is:

config BIG_KEYS
        bool "Large payload keys"

...meaning that it currently is not being built as a module by anyone.

Lets remove the modular code that is essentially orphaned, so that
when reading the driver there is no doubt it is builtin-only.

Since module_init translates to device_initcall in the non-modular
case, the init ordering remains unchanged with this commit.

We also delete the MODULE_LICENSE tag since all that information
is already contained at the top of the file in the comments.

Cc: James Morris <[email protected]>
Cc: "Serge E. Hallyn" <[email protected]>
Cc: [email protected]
Cc: [email protected]
Signed-off-by: Paul Gortmaker <[email protected]>
Signed-off-by: David Howells <[email protected]>
  • Loading branch information
Paul Gortmaker authored and dhowells committed Feb 18, 2016
1 parent d846e78 commit a1f2bdf
Showing 1 changed file with 1 addition and 14 deletions.
15 changes: 1 addition & 14 deletions security/keys/big_key.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
* 2 of the Licence, or (at your option) any later version.
*/

#include <linux/module.h>
#include <linux/init.h>
#include <linux/seq_file.h>
#include <linux/file.h>
Expand All @@ -18,8 +17,6 @@
#include <keys/user-type.h>
#include <keys/big_key-type.h>

MODULE_LICENSE("GPL");

/*
* Layout of key payload words.
*/
Expand Down Expand Up @@ -212,18 +209,8 @@ long big_key_read(const struct key *key, char __user *buffer, size_t buflen)
return ret;
}

/*
* Module stuff
*/
static int __init big_key_init(void)
{
return register_key_type(&key_type_big_key);
}

static void __exit big_key_cleanup(void)
{
unregister_key_type(&key_type_big_key);
}

module_init(big_key_init);
module_exit(big_key_cleanup);
device_initcall(big_key_init);

0 comments on commit a1f2bdf

Please sign in to comment.