aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2020-10-13 16:24:42 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2020-10-13 16:24:42 -0700
commit01fb1e2f42d607ef5eb7a7ca54a0f0901fb5856c (patch)
treeb11a56243f3f5a35259a564cdf5f02ee5ae29cb3 /kernel
parentMerge tag 'Smack-for-5.10' of git://github.com/cschaufler/smack-next (diff)
parentaudit: Remove redundant null check (diff)
downloadlinux-dev-01fb1e2f42d607ef5eb7a7ca54a0f0901fb5856c.tar.xz
linux-dev-01fb1e2f42d607ef5eb7a7ca54a0f0901fb5856c.zip
Merge tag 'audit-pr-20201012' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/audit
Pull audit updates from Paul Moore: "A small set of audit patches for v5.10. There are only three patches in total, and all three are trivial fixes that don't really warrant any explanations beyond their descriptions. As usual, all three patches pass our test suite" * tag 'audit-pr-20201012' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/audit: audit: Remove redundant null check audit: uninitialize variable audit_sig_sid audit: change unnecessary globals into statics
Diffstat (limited to 'kernel')
-rw-r--r--kernel/audit.c9
-rw-r--r--kernel/audit.h4
2 files changed, 4 insertions, 9 deletions
diff --git a/kernel/audit.c b/kernel/audit.c
index 7efaece534a9..68cee3bc8cfe 100644
--- a/kernel/audit.c
+++ b/kernel/audit.c
@@ -123,9 +123,9 @@ static u32 audit_backlog_limit = 64;
static u32 audit_backlog_wait_time = AUDIT_BACKLOG_WAIT_TIME;
/* The identity of the user shutting down the audit system. */
-kuid_t audit_sig_uid = INVALID_UID;
-pid_t audit_sig_pid = -1;
-u32 audit_sig_sid = 0;
+static kuid_t audit_sig_uid = INVALID_UID;
+static pid_t audit_sig_pid = -1;
+static u32 audit_sig_sid;
/* Records can be lost in several ways:
0) [suppressed in audit_alloc]
@@ -934,8 +934,7 @@ static void audit_free_reply(struct audit_reply *reply)
if (!reply)
return;
- if (reply->skb)
- kfree_skb(reply->skb);
+ kfree_skb(reply->skb);
if (reply->net)
put_net(reply->net);
kfree(reply);
diff --git a/kernel/audit.h b/kernel/audit.h
index ddc22878433d..3b9c0945225a 100644
--- a/kernel/audit.h
+++ b/kernel/audit.h
@@ -327,10 +327,6 @@ static inline int audit_signal_info_syscall(struct task_struct *t)
extern char *audit_unpack_string(void **bufp, size_t *remain, size_t len);
-extern pid_t audit_sig_pid;
-extern kuid_t audit_sig_uid;
-extern u32 audit_sig_sid;
-
extern int audit_filter(int msgtype, unsigned int listtype);
extern void audit_ctl_lock(void);