mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-22 23:04:43 +00:00
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>
This commit is contained in:
parent
a188339ca5
commit
2e21865faf
3 changed files with 16 additions and 18 deletions
|
@ -402,8 +402,8 @@ extern struct ctl_table key_sysctls[];
|
|||
* the userspace interface
|
||||
*/
|
||||
extern int install_thread_keyring_to_cred(struct cred *cred);
|
||||
extern void key_fsuid_changed(struct task_struct *tsk);
|
||||
extern void key_fsgid_changed(struct task_struct *tsk);
|
||||
extern void key_fsuid_changed(struct cred *new_cred);
|
||||
extern void key_fsgid_changed(struct cred *new_cred);
|
||||
extern void key_init(void);
|
||||
|
||||
#else /* CONFIG_KEYS */
|
||||
|
@ -418,8 +418,8 @@ extern void key_init(void);
|
|||
#define make_key_ref(k, p) NULL
|
||||
#define key_ref_to_ptr(k) NULL
|
||||
#define is_key_possessed(k) 0
|
||||
#define key_fsuid_changed(t) do { } while(0)
|
||||
#define key_fsgid_changed(t) do { } while(0)
|
||||
#define key_fsuid_changed(c) do { } while(0)
|
||||
#define key_fsgid_changed(c) do { } while(0)
|
||||
#define key_init() do { } while(0)
|
||||
|
||||
#endif /* CONFIG_KEYS */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue