linux-audit.redhat.com archive mirror
 help / color / mirror / Atom feed
From: Jules Irenge <jbi.octave@gmail.com>
To: linux-kernel@vger.kernel.org
Cc: Jules Irenge <jbi.octave@gmail.com>,
	"moderated list:AUDIT SUBSYSTEM" <linux-audit@redhat.com>
Subject: [RESEND PATCH 2/2] audit: uninitialize variable audit_sig_sid
Date: Mon,  3 Aug 2020 13:34:39 +0100	[thread overview]
Message-ID: <20200803123439.83400-3-jbi.octave@gmail.com> (raw)
In-Reply-To: <20200803123439.83400-1-jbi.octave@gmail.com>

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 <jbi.octave@gmail.com>
---
 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

--
Linux-audit mailing list
Linux-audit@redhat.com
https://www.redhat.com/mailman/listinfo/linux-audit


  parent reply	other threads:[~2020-08-03 12:41 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <0/2>
     [not found] ` <20200803122430.82364-1-jbi.octave@gmail.com>
2020-08-03 12:24   ` [PATCH 1/2] audit: change unnecessary globals into statics Jules Irenge
2020-08-03 12:24   ` [PATCH 2/2] audit: uninitialize variable audit_sig_sid Jules Irenge
     [not found] ` <20200803123439.83400-1-jbi.octave@gmail.com>
2020-08-03 12:34   ` [RESEND PATCH 1/2] audit: change unnecessary globals into statics Jules Irenge
2020-08-06 18:33     ` Paul Moore
2020-08-18  0:38       ` Paul Moore
2020-08-03 12:34   ` Jules Irenge [this message]
2020-08-06 18:35     ` [RESEND PATCH 2/2] audit: uninitialize variable audit_sig_sid Paul Moore
2020-08-18  0:38       ` Paul Moore

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200803123439.83400-3-jbi.octave@gmail.com \
    --to=jbi.octave@gmail.com \
    --cc=linux-audit@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).