diff options
| author | Ricardo Robaina <rrobaina@redhat.com> | 2026-08-07 11:05:21 -0300 |
|---|---|---|
| committer | Paul Moore <paul@paul-moore.com> | 2026-08-31 13:52:35 -0400 |
| commit | d50ba2ab3744ecfd74a67eefffbadf613ebe8fa5 (patch) | |
| tree | f6094ed4573be08ebbdcdf87f4a57d2adcc8c0f9 | |
| parent | b09cfc161840ad3544812ad17537b4dc0e40506e (diff) | |
| download | linux-next-d50ba2ab3744ecfd74a67eefffbadf613ebe8fa5.tar.gz linux-next-d50ba2ab3744ecfd74a67eefffbadf613ebe8fa5.zip | |
audit: add missing unlikely hint to audit_dummy_context() wrappers
The inline wrappers: audit_log_kern_module(), audit_tk_injoffset(),
and audit_ntp_log() check audit_dummy_context() without unlikely(),
unlike every other wrapper in the file.
Add the missing annotations for consistency.
Signed-off-by: Ricardo Robaina <rrobaina@redhat.com>
Signed-off-by: Paul Moore <paul@paul-moore.com>
| -rw-r--r-- | include/linux/audit.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/include/linux/audit.h b/include/linux/audit.h index 45abb3722d30..18b44a1c5397 100644 --- a/include/linux/audit.h +++ b/include/linux/audit.h @@ -547,7 +547,7 @@ static inline void audit_openat2_how(struct open_how *how) static inline void audit_log_kern_module(const char *name) { - if (!audit_dummy_context()) + if (unlikely(!audit_dummy_context())) __audit_log_kern_module(name); } @@ -563,7 +563,7 @@ static inline void audit_tk_injoffset(struct timespec64 offset) if (offset.tv_sec == 0 && offset.tv_nsec == 0) return; - if (!audit_dummy_context()) + if (unlikely(!audit_dummy_context())) __audit_tk_injoffset(offset); } @@ -586,7 +586,7 @@ static inline void audit_ntp_set_new(struct audit_ntp_data *ad, static inline void audit_ntp_log(const struct audit_ntp_data *ad) { - if (!audit_dummy_context()) + if (unlikely(!audit_dummy_context())) __audit_ntp_log(ad); } |
