* [PATCH] ceph: fix double free for req when failing to allocate sparse ext map
@ 2023-01-11 1:14 xiubli
2023-01-11 12:22 ` Ilya Dryomov
2023-01-12 12:09 ` Jeff Layton
0 siblings, 2 replies; 5+ messages in thread
From: xiubli @ 2023-01-11 1:14 UTC (permalink / raw
To: idryomov, ceph-devel; +Cc: jlayton, mchangir, vshankar, Xiubo Li
From: Xiubo Li <xiubli@redhat.com>
Introduced by commit d1f436736924 ("ceph: add new mount option to enable
sparse reads") and will fold this into the above commit since it's
still in the testing branch.
Reported-by: Ilya Dryomov <idryomov@gmail.com>
Signed-off-by: Xiubo Li <xiubli@redhat.com>
---
fs/ceph/addr.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/fs/ceph/addr.c b/fs/ceph/addr.c
index 17758cb607ec..3561c95d7e23 100644
--- a/fs/ceph/addr.c
+++ b/fs/ceph/addr.c
@@ -351,10 +351,8 @@ static void ceph_netfs_issue_read(struct netfs_io_subrequest *subreq)
if (sparse) {
err = ceph_alloc_sparse_ext_map(&req->r_ops[0]);
- if (err) {
- ceph_osdc_put_request(req);
+ if (err)
goto out;
- }
}
dout("%s: pos=%llu orig_len=%zu len=%llu\n", __func__, subreq->start, subreq->len, len);
--
2.39.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] ceph: fix double free for req when failing to allocate sparse ext map
2023-01-11 1:14 [PATCH] ceph: fix double free for req when failing to allocate sparse ext map xiubli
@ 2023-01-11 12:22 ` Ilya Dryomov
2023-01-12 4:22 ` Xiubo Li
2023-01-12 12:09 ` Jeff Layton
1 sibling, 1 reply; 5+ messages in thread
From: Ilya Dryomov @ 2023-01-11 12:22 UTC (permalink / raw
To: xiubli; +Cc: ceph-devel, jlayton, mchangir, vshankar
On Wed, Jan 11, 2023 at 2:14 AM <xiubli@redhat.com> wrote:
>
> From: Xiubo Li <xiubli@redhat.com>
>
> Introduced by commit d1f436736924 ("ceph: add new mount option to enable
> sparse reads") and will fold this into the above commit since it's
> still in the testing branch.
>
> Reported-by: Ilya Dryomov <idryomov@gmail.com>
> Signed-off-by: Xiubo Li <xiubli@redhat.com>
> ---
> fs/ceph/addr.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/fs/ceph/addr.c b/fs/ceph/addr.c
> index 17758cb607ec..3561c95d7e23 100644
> --- a/fs/ceph/addr.c
> +++ b/fs/ceph/addr.c
> @@ -351,10 +351,8 @@ static void ceph_netfs_issue_read(struct netfs_io_subrequest *subreq)
>
> if (sparse) {
> err = ceph_alloc_sparse_ext_map(&req->r_ops[0]);
> - if (err) {
> - ceph_osdc_put_request(req);
> + if (err)
> goto out;
> - }
> }
>
> dout("%s: pos=%llu orig_len=%zu len=%llu\n", __func__, subreq->start, subreq->len, len);
> --
> 2.39.0
>
Hi Xiubo,
Looks good, let's fold this into that commit since it's still testing
branch material.
Thanks,
Ilya
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] ceph: fix double free for req when failing to allocate sparse ext map
2023-01-11 12:22 ` Ilya Dryomov
@ 2023-01-12 4:22 ` Xiubo Li
0 siblings, 0 replies; 5+ messages in thread
From: Xiubo Li @ 2023-01-12 4:22 UTC (permalink / raw
To: Ilya Dryomov; +Cc: ceph-devel, jlayton, mchangir, vshankar
On 11/01/2023 20:22, Ilya Dryomov wrote:
> On Wed, Jan 11, 2023 at 2:14 AM <xiubli@redhat.com> wrote:
>> From: Xiubo Li <xiubli@redhat.com>
>>
>> Introduced by commit d1f436736924 ("ceph: add new mount option to enable
>> sparse reads") and will fold this into the above commit since it's
>> still in the testing branch.
>>
>> Reported-by: Ilya Dryomov <idryomov@gmail.com>
>> Signed-off-by: Xiubo Li <xiubli@redhat.com>
>> ---
>> fs/ceph/addr.c | 4 +---
>> 1 file changed, 1 insertion(+), 3 deletions(-)
>>
>> diff --git a/fs/ceph/addr.c b/fs/ceph/addr.c
>> index 17758cb607ec..3561c95d7e23 100644
>> --- a/fs/ceph/addr.c
>> +++ b/fs/ceph/addr.c
>> @@ -351,10 +351,8 @@ static void ceph_netfs_issue_read(struct netfs_io_subrequest *subreq)
>>
>> if (sparse) {
>> err = ceph_alloc_sparse_ext_map(&req->r_ops[0]);
>> - if (err) {
>> - ceph_osdc_put_request(req);
>> + if (err)
>> goto out;
>> - }
>> }
>>
>> dout("%s: pos=%llu orig_len=%zu len=%llu\n", __func__, subreq->start, subreq->len, len);
>> --
>> 2.39.0
>>
> Hi Xiubo,
>
> Looks good, let's fold this into that commit since it's still testing
> branch material.
Yeah, sure will do.
Thanks
- Xiubo
> Thanks,
>
> Ilya
>
--
Best Regards,
Xiubo Li (李秀波)
Email: xiubli@redhat.com/xiubli@ibm.com
Slack: @Xiubo Li
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] ceph: fix double free for req when failing to allocate sparse ext map
2023-01-11 1:14 [PATCH] ceph: fix double free for req when failing to allocate sparse ext map xiubli
2023-01-11 12:22 ` Ilya Dryomov
@ 2023-01-12 12:09 ` Jeff Layton
2023-01-13 3:09 ` Xiubo Li
1 sibling, 1 reply; 5+ messages in thread
From: Jeff Layton @ 2023-01-12 12:09 UTC (permalink / raw
To: xiubli, idryomov, ceph-devel; +Cc: mchangir, vshankar
On Wed, 2023-01-11 at 09:14 +0800, xiubli@redhat.com wrote:
> From: Xiubo Li <xiubli@redhat.com>
>
> Introduced by commit d1f436736924 ("ceph: add new mount option to enable
> sparse reads") and will fold this into the above commit since it's
> still in the testing branch.
>
> Reported-by: Ilya Dryomov <idryomov@gmail.com>
> Signed-off-by: Xiubo Li <xiubli@redhat.com>
> ---
> fs/ceph/addr.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/fs/ceph/addr.c b/fs/ceph/addr.c
> index 17758cb607ec..3561c95d7e23 100644
> --- a/fs/ceph/addr.c
> +++ b/fs/ceph/addr.c
> @@ -351,10 +351,8 @@ static void ceph_netfs_issue_read(struct netfs_io_subrequest *subreq)
>
> if (sparse) {
> err = ceph_alloc_sparse_ext_map(&req->r_ops[0]);
> - if (err) {
> - ceph_osdc_put_request(req);
> + if (err)
> goto out;
> - }
> }
>
> dout("%s: pos=%llu orig_len=%zu len=%llu\n", __func__, subreq->start, subreq->len, len);
Looks right.
Reviewed-by: Jeff Layton <jlayton@kernel.org>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] ceph: fix double free for req when failing to allocate sparse ext map
2023-01-12 12:09 ` Jeff Layton
@ 2023-01-13 3:09 ` Xiubo Li
0 siblings, 0 replies; 5+ messages in thread
From: Xiubo Li @ 2023-01-13 3:09 UTC (permalink / raw
To: Jeff Layton, idryomov, ceph-devel; +Cc: mchangir, vshankar
On 12/01/2023 20:09, Jeff Layton wrote:
> On Wed, 2023-01-11 at 09:14 +0800, xiubli@redhat.com wrote:
>> From: Xiubo Li <xiubli@redhat.com>
>>
>> Introduced by commit d1f436736924 ("ceph: add new mount option to enable
>> sparse reads") and will fold this into the above commit since it's
>> still in the testing branch.
>>
>> Reported-by: Ilya Dryomov <idryomov@gmail.com>
>> Signed-off-by: Xiubo Li <xiubli@redhat.com>
>> ---
>> fs/ceph/addr.c | 4 +---
>> 1 file changed, 1 insertion(+), 3 deletions(-)
>>
>> diff --git a/fs/ceph/addr.c b/fs/ceph/addr.c
>> index 17758cb607ec..3561c95d7e23 100644
>> --- a/fs/ceph/addr.c
>> +++ b/fs/ceph/addr.c
>> @@ -351,10 +351,8 @@ static void ceph_netfs_issue_read(struct netfs_io_subrequest *subreq)
>>
>> if (sparse) {
>> err = ceph_alloc_sparse_ext_map(&req->r_ops[0]);
>> - if (err) {
>> - ceph_osdc_put_request(req);
>> + if (err)
>> goto out;
>> - }
>> }
>>
>> dout("%s: pos=%llu orig_len=%zu len=%llu\n", __func__, subreq->start, subreq->len, len);
> Looks right.
>
> Reviewed-by: Jeff Layton <jlayton@kernel.org>
Already folded this into the previous commit.
Thanks Jeff.
--
Best Regards,
Xiubo Li (李秀波)
Email: xiubli@redhat.com/xiubli@ibm.com
Slack: @Xiubo Li
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2023-01-13 3:10 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-01-11 1:14 [PATCH] ceph: fix double free for req when failing to allocate sparse ext map xiubli
2023-01-11 12:22 ` Ilya Dryomov
2023-01-12 4:22 ` Xiubo Li
2023-01-12 12:09 ` Jeff Layton
2023-01-13 3:09 ` Xiubo Li
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.