Re: [PATCH 2/4] audit: uninitialize global variable audit_sig_sid

From: Jules Irenge
Date: Sun Aug 02 2020 - 10:33:53 EST




On Sat, 1 Aug 2020, Joe Perches wrote:

> On Sat, 2020-08-01 at 19:46 +0100, Jules Irenge wrote:
> > Checkpatch tool reports an error at variable audit_sig_sid declaration
> []
> > diff --git a/kernel/audit.c b/kernel/audit.c
> []
> > @@ -125,7 +125,7 @@ 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;
> > +u32 audit_sig_sid;
>
> All of these are unused outside of audit.c and might as
> well be static and removed from the .h file.
>

Thanks for reply, I will resend a second version with the recommendation,
namely make the above static and remove them from the .h file.

Jules