Skip to content

Commit

Permalink
Fix P2ALIGN overflow in dmu_object_alloc_impl
Browse files Browse the repository at this point in the history
This is a subset of much bigger master patch: "Replace P2ALIGN with
P2ALIGN_TYPED and delete P2ALIGN.", supposed to fix our specific
issue without risking resolving merge conflicts last moment.
  • Loading branch information
amotin committed May 22, 2024
1 parent ceed999 commit 4a6f2fe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion module/zfs/dmu_object.c
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ dmu_object_alloc_impl(objset_t *os, dmu_object_type_t ot, int blocksize,
* is not suitably aligned.
*/
os->os_obj_next_chunk =
P2ALIGN(object, dnodes_per_chunk) +
P2ALIGN_TYPED(object, dnodes_per_chunk, uint64_t) +
dnodes_per_chunk;
(void) atomic_swap_64(cpuobj, object);
mutex_exit(&os->os_obj_lock);
Expand Down

0 comments on commit 4a6f2fe

Please sign in to comment.