Re: [RESEND PATCH 2/2] audit: uninitialize variable audit_sig_sid
On Thu, Aug 6, 2020 at 2:35 PM Paul Moore wrote: > > On Mon, Aug 3, 2020 at 8:35 AM Jules Irenge wrote: > > > > Checkpatch tool reports > > > > "ERROR: do not initialise globals/statics to 0" > > > > To fix this, audit_sig_sid is uninitialized > > As this is stored in the .bss section, > > the compiler can initialize the variable automatically. > > > > Signed-off-by: Jules Irenge > > --- > > kernel/audit.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > Similar to patch 1/2, this will need to wait until after the merge > window closes. ... also merged this patch into audit/next. Thanks again. -- paul moore www.paul-moore.com
Re: [RESEND PATCH 2/2] audit: uninitialize variable audit_sig_sid
On Mon, Aug 3, 2020 at 8:35 AM Jules Irenge wrote: > > Checkpatch tool reports > > "ERROR: do not initialise globals/statics to 0" > > To fix this, audit_sig_sid is uninitialized > As this is stored in the .bss section, > the compiler can initialize the variable automatically. > > Signed-off-by: Jules Irenge > --- > kernel/audit.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Similar to patch 1/2, this will need to wait until after the merge window closes. -- paul moore www.paul-moore.com
[RESEND PATCH 2/2] audit: uninitialize variable audit_sig_sid
Checkpatch tool reports "ERROR: do not initialise globals/statics to 0" To fix this, audit_sig_sid is uninitialized As this is stored in the .bss section, the compiler can initialize the variable automatically. Signed-off-by: Jules Irenge --- kernel/audit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/audit.c b/kernel/audit.c index afd7827cf6e8..1c74d1d788b6 100644 --- 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. */ static kuid_t audit_sig_uid = INVALID_UID; static pid_t audit_sig_pid = -1; -static u32 audit_sig_sid = 0; +static u32 audit_sig_sid; /* Records can be lost in several ways: 0) [suppressed in audit_alloc] -- 2.26.2