Re: IORING_REGISTER_CREDS[_UPDATE]() and credfd_create()?

Pavel Begunkov
2020-01-29T00:22:21Z

[-- Attachment #1.1: Type: text/plain, Size: 687 bytes --]

On 29/01/2020 03:20, Jens Axboe wrote:
> On 1/28/20 5:10 PM, Pavel Begunkov wrote:
>>>>> Checked out ("don't use static creds/mm assignments")
>>>>>
>>>>> 1. do we miscount cred refs? We grab one in get_current_cred() for each async
>>>>> request, but if (worker->creds != work->creds) it will never be put.
>>>>
>>>> Yeah I think you're right, that needs a bit of fixing up.
>>>
>>
>> Hmm, it seems it leaks it unconditionally, as it grabs in a ref in
>> override_creds().
>>
>
> We grab one there, and an extra one. Then we drop one of them inline,
> and the other in __io_req_aux_free().
>
Yeah, with the last patch it should make it even

--
Pavel Begunkov

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]