Re: [PATCH v2 1/2] KEYS: use synchronous task work for changing parent credentials
From: Jann Horn
Date: Tue Sep 10 2024 - 19:05:55 EST
On Tue, Sep 10, 2024 at 11:07 PM Paul Moore <paul@xxxxxxxxxxxxxx> wrote:
> On Aug 5, 2024 Jann Horn <jannh@xxxxxxxxxx> 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.