> s390/cert_store: Return an owned reference from find_cs_keyring() TL;DR: Commit message only: it should say which reference was over-dropped and that fill_cs_keyring() now also puts the keyring_alloc() reference on success; the review finds no bug.
> s390/cert_store: Return an owned reference from find_cs_keyring() > > Return an owned reference from find_cs_keyring() so that it will not get > dropped. > Cc: David Howells <[email protected]> > Cc: [email protected] # v6.6+ > Fixes: 8cf57d7217c3 ("s390: add support for user-defined certificates") > Signed-off-by: Jarkko Sakkinen <[email protected]> This isn't a bug, but could the changelog describe which reference was being over-dropped? Previously find_cs_keyring() dropped the reference from keyring_search() or request_key() and returned a borrowed pointer, and cleanup_cs_keys() then called key_put() on it. On the fill_cs_keyring() error path the keyring_alloc() reference had already been put, so that key_put() dropped the link reference. On the request_key() path it dropped a reference that was never owned. The patch also makes fill_cs_keyring() put the keyring_alloc() reference on the success path, so the keyring is pinned only by its link in the user session keyring after a refresh. Could the message mention this, since it is what makes the cleanup_cs_keys() and fill_cs_keyring() hunks balance? --- AI reviewed your patch. Please fix the bug or email reply why it's not a bug. See: https://github.com/kernel-patches/vmtest/blob/master/ci/claude/README.md CI run summary: https://github.com/kernel-patches/bpf/actions/runs/43615900108
