Skip to content

Commit d934f97

Browse files
committed
ipe: move initcalls to the LSM framework
Reviewed-by: Kees Cook <kees@kernel.org> Tested-by: Fan Wu <wufan@kernel.org> Acked-by: Fan Wu <wufan@kernel.org> Reviewed-by: John Johansen <john.johhansen@canonical.com> Signed-off-by: Paul Moore <paul@paul-moore.com>
1 parent b0374e7 commit d934f97

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

security/ipe/fs.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ static const struct file_operations enforce_fops = {
193193
* Return: %0 on success. If an error occurs, the function will return
194194
* the -errno.
195195
*/
196-
static int __init ipe_init_securityfs(void)
196+
int __init ipe_init_securityfs(void)
197197
{
198198
int rc = 0;
199199
struct ipe_policy *ap;
@@ -244,5 +244,3 @@ static int __init ipe_init_securityfs(void)
244244
securityfs_remove(root);
245245
return rc;
246246
}
247-
248-
fs_initcall(ipe_init_securityfs);

security/ipe/ipe.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,4 +95,5 @@ DEFINE_LSM(ipe) = {
9595
.id = &ipe_lsmid,
9696
.init = ipe_init,
9797
.blobs = &ipe_blobs,
98+
.initcall_fs = ipe_init_securityfs,
9899
};

security/ipe/ipe.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,6 @@ struct ipe_bdev *ipe_bdev(struct block_device *b);
2323
struct ipe_inode *ipe_inode(const struct inode *inode);
2424
#endif /* CONFIG_IPE_PROP_FS_VERITY_BUILTIN_SIG */
2525

26+
int ipe_init_securityfs(void);
27+
2628
#endif /* _IPE_H */

0 commit comments

Comments
 (0)