[PATCH v2 1/2] KEYS: use synchronous task work for changing parent credentials

Jann Horn jannh at google.com
Tue Sep 10 23:05:04 UTC 2024


On Tue, Sep 10, 2024 at 11:07 PM Paul Moore <paul at paul-moore.com> wrote:
> On Aug  5, 2024 Jann Horn <jannh at google.com> wrote:
> > -     cred->session_keyring = key_ref_to_ptr(keyring_r);
> > -     keyring_r = NULL;
> > -     init_task_work(newwork, key_change_session_keyring);
> > +     /* the parent mustn't be init and mustn't be a kernel thread */
> > +     if (is_global_init(parent) || (READ_ONCE(parent->flags) & PF_KTHREAD) != 0)
> > +             goto put_task;
>
> I think we need to explicitly set @ret if we are failing here, yes?

Ah, yes. Thanks.



More information about the Linux-security-module-archive mailing list