From: David Howells <dhowells@redhat.com>
To: Patrick Donnelly <batrick@batbytes.com>
Cc: dhowells@redhat.com, Xiubo Li <xiubli@redhat.com>,
Ilya Dryomov <idryomov@gmail.com>,
Jeff Layton <jlayton@kernel.org>,
Patrick Donnelly <pdonnell@redhat.com>,
stable@vger.kernel.org, ceph-devel@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ceph: fix cap ref leak via netfs init_request
Date: Fri, 04 Oct 2024 16:36:06 +0100 [thread overview]
Message-ID: <3822870.1728056166@warthog.procyon.org.uk> (raw)
In-Reply-To: <20241003010512.58559-1-batrick@batbytes.com>
Patrick Donnelly <batrick@batbytes.com> wrote:
> Log recovered from a user's cluster:
>
> <7>[ 5413.970692] ceph: get_cap_refs 00000000958c114b ret 1 got Fr
> <7>[ 5413.970695] ceph: start_read 00000000958c114b, no cache cap
> ...
> <7>[ 5473.934609] ceph: my wanted = Fr, used = Fr, dirty -
> <7>[ 5473.934616] ceph: revocation: pAsLsXsFr -> pAsLsXs (revoking Fr)
> <7>[ 5473.934632] ceph: __ceph_caps_issued 00000000958c114b cap 00000000f7784259 issued pAsLsXs
> <7>[ 5473.934638] ceph: check_caps 10000000e68.fffffffffffffffe file_want - used Fr dirty - flushing - issued pAsLsXs revoking Fr retain pAsLsXsFsr AUTHONLY NOINVAL FLUSH_FORCE
>
> The MDS subsequently complains that the kernel client is late releasing caps.
>
> Approximately, a series of changes to this code by the three commits cited
> below resulted in subtle resource cleanup to be missed. The main culprit is the
> change in error handling in 2d31604 which meant that a failure in init_request
> would no longer cause cleanup to be called. That would prevent the
> ceph_put_cap_refs which would cleanup the leaked cap ref.
>
> Closes: https://tracker.ceph.com/issues/67008
> Fixes: 49870056005ca9387e5ee31451991491f99cc45f ("ceph: convert ceph_readpages to ceph_readahead")
> Fixes: 2de160417315b8d64455fe03e9bb7d3308ac3281 ("netfs: Change ->init_request() to return an error code")
> Fixes: a5c9dc4451394b2854493944dcc0ff71af9705a3 ("ceph: Make ceph_init_request() check caps on readahead")
Note that you only need the first 12 digits of the SHA1 sum.
> Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
> Cc: stable@vger.kernel.org
Reviewed-by: David Howells <dhowells@redhat.com>
next prev parent reply other threads:[~2024-10-04 15:36 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-03 1:05 [PATCH] ceph: fix cap ref leak via netfs init_request Patrick Donnelly
2024-10-03 8:01 ` Ilya Dryomov
2024-10-04 15:36 ` David Howells [this message]
2024-10-04 15:37 ` David Howells
2024-10-04 17:06 ` Ilya Dryomov
2024-10-08 5:11 ` Xiubo Li
-- strict thread matches above, loose matches on Subject: below --
2024-10-02 20:08 Patrick Donnelly
2024-10-02 21:52 ` Ilya Dryomov
2024-10-03 1:07 ` Patrick Donnelly
2024-10-04 15:34 ` David Howells
2024-10-02 19:58 Patrick Donnelly
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3822870.1728056166@warthog.procyon.org.uk \
--to=dhowells@redhat.com \
--cc=batrick@batbytes.com \
--cc=ceph-devel@vger.kernel.org \
--cc=idryomov@gmail.com \
--cc=jlayton@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pdonnell@redhat.com \
--cc=stable@vger.kernel.org \
--cc=xiubli@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.