projects
/
linux-block.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4944029
)
landlock: Constify get_mode_access()
author
Mickaël Salaün
<mic@digikod.net>
Fri, 10 Jan 2025 15:39:14 +0000
(16:39 +0100)
committer
Mickaël Salaün
<mic@digikod.net>
Tue, 14 Jan 2025 10:57:44 +0000
(11:57 +0100)
Use __attribute_const__ for get_mode_access().
Reviewed-by: Günther Noack <gnoack3000@gmail.com>
Link:
https://lore.kernel.org/r/20250110153918.241810-2-mic@digikod.net
Signed-off-by: Mickaël Salaün <mic@digikod.net>
security/landlock/fs.c
patch
|
blob
|
blame
|
history
diff --git
a/security/landlock/fs.c
b/security/landlock/fs.c
index 7adb25150488fc07f349e0a690e10e85c5c10a52..f81d0335b8257579be24191b29be64a2a2cd76be 100644
(file)
--- a/
security/landlock/fs.c
+++ b/
security/landlock/fs.c
@@
-932,7
+932,7
@@
static int current_check_access_path(const struct path *const path,
return check_access_path(dom, path, access_request);
}
-static access_mask_t get_mode_access(const umode_t mode)
+static
__attribute_const__
access_mask_t get_mode_access(const umode_t mode)
{
switch (mode & S_IFMT) {
case S_IFLNK: