Linux Security Modules development
 help / color / mirror / Atom feed
From: Jann Horn <jannh@google.com>
To: Paul Moore <paul@paul-moore.com>
Cc: "Serge E. Hallyn" <serge@hallyn.com>,
	 linux-security-module@vger.kernel.org,
	linux-kernel@vger.kernel.org,  kernel test robot <lkp@intel.com>,
	Jann Horn <jannh@google.com>
Subject: [PATCH] cred: remove RCU initializer for init_task.cred
Date: Wed, 12 Aug 2026 16:51:46 +0200	[thread overview]
Message-ID: <20260812-task-cred-fixup-v1-1-318440888adc@google.com> (raw)

sparse noticed that an RCU initializer was left behind for init_task.cred,
which is no longer marked __rcu. Fix it up.

Fixes: a4229a2a16a8 ("cred: clarify that task_struct::cred is only for the current task")
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202608121153.nzs6HZg7-lkp@intel.com/
Signed-off-by: Jann Horn <jannh@google.com>
---
maybe squash this into the original commit, if that is a thing you do on
the dev-staging branch?
---
 init/init_task.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/init/init_task.c b/init/init_task.c
index b67ef6040a65..6529b002135b 100644
--- a/init/init_task.c
+++ b/init/init_task.c
@@ -159,7 +159,7 @@ struct task_struct init_task __aligned(L1_CACHE_BYTES) = {
 	.sibling	= LIST_HEAD_INIT(init_task.sibling),
 	.group_leader	= &init_task,
 	RCU_POINTER_INITIALIZER(real_cred, &init_cred),
-	RCU_POINTER_INITIALIZER(cred, &init_cred),
+	.cred		= &init_cred,
 	.comm		= INIT_TASK_COMM,
 	.thread		= INIT_THREAD,
 	.fs		= &init_fs,

---
base-commit: 1f2f7a1fd1fc34e757107e3a3849f8d22b14cc6b
change-id: 20260812-task-cred-fixup-2e5c5dbe6a3b

Best regards,
--  
Jann Horn <jannh@google.com>


             reply	other threads:[~2026-08-12 14:51 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-12 14:51 Jann Horn [this message]
2026-08-12 15:48 ` [PATCH] cred: remove RCU initializer for init_task.cred 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=20260812-task-cred-fixup-v1-1-318440888adc@google.com \
    --to=jannh@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-security-module@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=paul@paul-moore.com \
    --cc=serge@hallyn.com \
    /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