Skip to content

Commit a1f2bdf

Browse files
Paul Gortmakerdhowells
authored andcommitted
security/keys: make big_key.c explicitly non-modular
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]>
1 parent d846e78 commit a1f2bdf

File tree

1 file changed

+1
-14
lines changed

1 file changed

+1
-14
lines changed

security/keys/big_key.c

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
* 2 of the Licence, or (at your option) any later version.
1010
*/
1111

12-
#include <linux/module.h>
1312
#include <linux/init.h>
1413
#include <linux/seq_file.h>
1514
#include <linux/file.h>
@@ -18,8 +17,6 @@
1817
#include <keys/user-type.h>
1918
#include <keys/big_key-type.h>
2019

21-
MODULE_LICENSE("GPL");
22-
2320
/*
2421
* Layout of key payload words.
2522
*/
@@ -212,18 +209,8 @@ long big_key_read(const struct key *key, char __user *buffer, size_t buflen)
212209
return ret;
213210
}
214211

215-
/*
216-
* Module stuff
217-
*/
218212
static int __init big_key_init(void)
219213
{
220214
return register_key_type(&key_type_big_key);
221215
}
222-
223-
static void __exit big_key_cleanup(void)
224-
{
225-
unregister_key_type(&key_type_big_key);
226-
}
227-
228-
module_init(big_key_init);
229-
module_exit(big_key_cleanup);
216+
device_initcall(big_key_init);

0 commit comments

Comments
 (0)