ahrens requested changes on this pull request.


> @@ -2644,6 +2644,17 @@ receive_read_record(struct receive_arg *ra)
                uint32_t size = P2ROUNDUP(drro->drr_bonuslen, 8);
                void *buf = kmem_zalloc(size, KM_SLEEP);
                dmu_object_info_t doi;
+
+               if (drro->drr_compress >= ZIO_COMPRESS_FUNCTIONS)
+                       return (SET_ERROR(ENOTSUP));

It looks like you need to `kmem_free(buf, size);` before returning (or better, 
allocate it after these checks).

> @@ -2712,6 +2741,9 @@ receive_read_record(struct receive_arg *ra)
                uint32_t size = P2ROUNDUP(drrwe->drr_psize, 8);
                void *buf = kmem_zalloc(size, KM_SLEEP);
 
+               if (drrwe->drr_compression >= ZIO_COMPRESS_FUNCTIONS)
+                       return (SET_ERROR(ENOTSUP));

same issue here with `buf`

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openzfs/openzfs/pull/630#pullrequestreview-160561905
------------------------------------------
openzfs: openzfs-developer
Permalink: 
https://openzfs.topicbox.com/groups/developer/Tc3a0a7ad59c999df-M9bdf0edd6d3bcda25707283f
Delivery options: https://openzfs.topicbox.com/groups/developer/subscription

Reply via email to