-
Notifications
You must be signed in to change notification settings - Fork 169
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(driver): use configure system to check for mnt_idmap for fs
Kernel 6.3 changed fs functions to `struct mnt_idmap`. Use the configure system in place of the version check to support driver build on RHEL 9 (namely 5.14.0-547.el9.x86_64) Signed-off-by: Angelo Puglisi <[email protected]>
- Loading branch information
1 parent
02ac6f6
commit cb3e5cf
Showing
2 changed files
with
35 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
/* | ||
Copyright (C) 2025 The Falco Authors. | ||
This file is dual licensed under either the MIT or GPL 2. See MIT.txt | ||
or GPL2.txt for full copies of the license. | ||
*/ | ||
|
||
/* | ||
* Check that fs function wants mnt_idmap | ||
* See linux 6.3 changes: | ||
* - https://github.com/torvalds/linux/commit/abf08576afe3 | ||
* - https://github.com/torvalds/linux/commit/01beba7957a2 | ||
*/ | ||
|
||
#include <linux/module.h> | ||
#include <linux/fs.h> | ||
|
||
MODULE_LICENSE("GPL"); | ||
MODULE_AUTHOR("the Falco authors"); | ||
|
||
static int fs_mnt_idmap_init(void) { | ||
struct mnt_idmap *idmap = NULL; | ||
const struct inode *inode = NULL; | ||
inode_owner_or_capable(idmap, inode); | ||
return 0; | ||
} | ||
|
||
static void fs_mnt_idmap_exit(void) {} | ||
|
||
module_init(fs_mnt_idmap_init); | ||
module_exit(fs_mnt_idmap_exit); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters