Skip to content

Commit 01fb1e2

Browse files
committed
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
2 parents 99a6740 + c072035 commit 01fb1e2

2 files changed

Lines changed: 4 additions & 9 deletions

File tree

kernel/audit.c

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -123,9 +123,9 @@ static u32 audit_backlog_limit = 64;
123123
static u32 audit_backlog_wait_time = AUDIT_BACKLOG_WAIT_TIME;
124124

125125
/* The identity of the user shutting down the audit system. */
126-
kuid_t audit_sig_uid = INVALID_UID;
127-
pid_t audit_sig_pid = -1;
128-
u32 audit_sig_sid = 0;
126+
static kuid_t audit_sig_uid = INVALID_UID;
127+
static pid_t audit_sig_pid = -1;
128+
static u32 audit_sig_sid;
129129

130130
/* Records can be lost in several ways:
131131
0) [suppressed in audit_alloc]
@@ -934,8 +934,7 @@ static void audit_free_reply(struct audit_reply *reply)
934934
if (!reply)
935935
return;
936936

937-
if (reply->skb)
938-
kfree_skb(reply->skb);
937+
kfree_skb(reply->skb);
939938
if (reply->net)
940939
put_net(reply->net);
941940
kfree(reply);

kernel/audit.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -327,10 +327,6 @@ static inline int audit_signal_info_syscall(struct task_struct *t)
327327

328328
extern char *audit_unpack_string(void **bufp, size_t *remain, size_t len);
329329

330-
extern pid_t audit_sig_pid;
331-
extern kuid_t audit_sig_uid;
332-
extern u32 audit_sig_sid;
333-
334330
extern int audit_filter(int msgtype, unsigned int listtype);
335331

336332
extern void audit_ctl_lock(void);

0 commit comments

Comments
 (0)