]> git.baikalelectronics.ru Git - kernel.git/commit
keys: sparse: Fix key_fs[ug]id_changed()
authorDavid Howells <dhowells@redhat.com>
Wed, 22 May 2019 13:06:51 +0000 (14:06 +0100)
committerDavid Howells <dhowells@redhat.com>
Wed, 22 May 2019 13:06:51 +0000 (14:06 +0100)
commit77a3a45ae00d280c462f547df18abc9eb6782982
treecb05e816e95bc4785b7c601b2f33d3ad6396e1fc
parent49250288820449e26abffc1305ba221bd05ce90d
keys: sparse: Fix key_fs[ug]id_changed()

Sparse warnings are incurred by key_fs[ug]id_changed() due to unprotected
accesses of tsk->cred, which is marked __rcu.

Fix this by passing the new cred struct to these functions from
commit_creds() rather than the task pointer.

Signed-off-by: David Howells <dhowells@redhat.com>
Reviewed-by: James Morris <jamorris@linux.microsoft.com>
include/linux/key.h
kernel/cred.c
security/keys/process_keys.c