Skip to content

Comments

rgw: initialize createparams zone_placement to avoid garbage value#60254

Merged
smanjara merged 2 commits intoceph:mainfrom
clwluvw:zonegroups-createbucket
Dec 3, 2024
Merged

rgw: initialize createparams zone_placement to avoid garbage value#60254
smanjara merged 2 commits intoceph:mainfrom
clwluvw:zonegroups-createbucket

Conversation

@clwluvw
Copy link
Member

@clwluvw clwluvw commented Oct 10, 2024

When creating a bucket from a secondary zonegroup and forwarding the request to the master zonegroup
(i.e., when bucket_zonegroup != &my_zonegroup), the createparams.zone_placement may remain uninitialized. This can lead to garbage values and result in a segmentation fault due to invalid memory access.

By explicitly initializing zone_placement to nullptr, we can eliminate this issue in cases where zone_placement is referenced like init_default_bucket_layout.

Fixes: https://tracker.ceph.com/issues/68500

When creating a bucket from a secondary zonegroup and forwarding
the request to the master zonegroup
(i.e., when `bucket_zonegroup != &my_zonegroup`), the
`createparams.zone_placement` may remain uninitialized. This can
lead to garbage values and result in a segmentation fault due to
invalid memory access.

By explicitly initializing `zone_placement` to `nullptr`, we can
eliminate this issue in cases where zone_placement is referenced
like `init_default_bucket_layout`.

Fixes: https://tracker.ceph.com/issues/68500
Signed-off-by: Seena Fallah <[email protected]>
@cbodley
Copy link
Contributor

cbodley commented Oct 11, 2024

@cbodley
Copy link
Contributor

cbodley commented Oct 11, 2024

jenkins test make check

2 similar comments
@clwluvw
Copy link
Member Author

clwluvw commented Oct 11, 2024

jenkins test make check

@clwluvw
Copy link
Member Author

clwluvw commented Oct 14, 2024

jenkins test make check

@cbodley
Copy link
Contributor

cbodley commented Oct 17, 2024

https://jenkins.ceph.com/job/ceph-pull-requests/144999/

The following tests FAILED:
32 - run-rbd-unit-tests-61.sh (Failed)

@cbodley
Copy link
Contributor

cbodley commented Oct 17, 2024

jenkins test make check

When creating a bucket in the secondary zonegroup, the `rgwx-zonegroup`
is mistakenly set to the master zonegroup when forwarding the request.
Instead, it should be set to the secondary zonegroup so that the master
zonegroup creates the bucket for the intended zonegroup rather than
for itself.

Fixes: https://tracker.ceph.com/issues/67610
Signed-off-by: Seena Fallah <[email protected]>
@smanjara
Copy link
Contributor

jenkins test make check

1 similar comment
@smanjara
Copy link
Contributor

jenkins test make check

@clwluvw
Copy link
Member Author

clwluvw commented Nov 26, 2024

jenkins test api

@clwluvw
Copy link
Member Author

clwluvw commented Nov 26, 2024

jenkins test make check arm64

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants