aboutsummaryrefslogtreecommitdiffstats
path: root/module/zfs/dmu_object.c
diff options
context:
space:
mode:
authorTom Caputi <[email protected]>2018-04-17 14:13:57 -0400
committerBrian Behlendorf <[email protected]>2018-04-17 11:13:57 -0700
commite14a32b1c844d924b9f093375c0badcf10f61741 (patch)
tree933a0515c9755a3b8ef854221a45c2de2e1112fc /module/zfs/dmu_object.c
parent0c03d21ac99ebdbefe65c319fc3712928c40af78 (diff)
Fix object reclaim when using large dnodes
Currently, when the receive_object() code wants to reclaim an object, it always assumes that the dnode is the legacy 512 bytes, even when the incoming bonus buffer exceeds this length. This causes a buffer overflow if --enable-debug is not provided and triggers an ASSERT if it is. This patch resolves this issue and adds an ASSERT to ensure this can't happen again. Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Tom Caputi <[email protected]> Closes #7097 Closes #7433
Diffstat (limited to 'module/zfs/dmu_object.c')
-rw-r--r--module/zfs/dmu_object.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/module/zfs/dmu_object.c b/module/zfs/dmu_object.c
index f53da407f..1fc71d103 100644
--- a/module/zfs/dmu_object.c
+++ b/module/zfs/dmu_object.c
@@ -249,7 +249,7 @@ dmu_object_reclaim(objset_t *os, uint64_t object, dmu_object_type_t ot,
int blocksize, dmu_object_type_t bonustype, int bonuslen, dmu_tx_t *tx)
{
return (dmu_object_reclaim_dnsize(os, object, ot, blocksize, bonustype,
- bonuslen, 0, tx));
+ bonuslen, DNODE_MIN_SIZE, tx));
}
int