]> git.proxmox.com Git - mirror_zfs.git/commit
Fix object reclaim when using large dnodes
authorTom Caputi <tcaputi@datto.com>
Tue, 17 Apr 2018 18:13:57 +0000 (14:13 -0400)
committerTony Hutter <hutter2@llnl.gov>
Fri, 6 Jul 2018 09:46:51 +0000 (02:46 -0700)
commitdc3eea871a53cca85dcba1aeca116b7bd2500958
treef95a1310ad269d6eddd5eba89cced0cd0797a46c
parentd2c8103a68e12581527e7d0e2a0c1429e2dcc9d1
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 <behlendorf1@llnl.gov>
Signed-off-by: Tom Caputi <tcaputi@datto.com>
Closes #7097
Closes #7433
module/zfs/dmu_object.c
module/zfs/dmu_send.c
module/zfs/dnode.c
tests/zfs-tests/tests/functional/rsend/send_realloc_dnode_size.ksh [changed mode: 0644->0755]