Files
mirror_zfs/module/zfs
Brian Atkinson c8184d714b Block cloning conditionally destroy ARC buffer
dmu_buf_will_clone() calls arc_buf_destroy() if there is an associated
ARC buffer with the dbuf. However, this can only be done conditionally.
If the previous dirty record's dr_data is pointed at db_dbf then
destroying it can lead to NULL pointer deference when syncing out the
previous dirty record.

This updates dmu_buf_fill_clone() to only call arc_buf_destroy() if the
previous dirty records dr_data is not pointing to db_buf. The block
clone wil still set the dbuf's db_buf and db_data to NULL, but this will
not cause any issues as any previous dirty record dr_data will still be
pointing at the ARC buffer.

Reviewed-by: Allan Jude <allan@klarasystems.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Alexander Motin <mav@FreeBSD.org>
Signed-off-by: Brian Atkinson <batkinson@lanl.gov>
Closes #16337
2024-08-01 18:22:43 -07:00
..
2024-03-25 16:50:35 -07:00
2022-03-15 15:13:42 -07:00
2022-03-15 15:13:42 -07:00
2023-01-10 13:39:22 -08:00
2024-05-29 10:49:11 -07:00
2024-05-29 10:49:11 -07:00
2024-05-29 10:49:11 -07:00
2024-05-29 10:49:11 -07:00
2024-05-29 10:49:11 -07:00
2024-07-29 14:47:01 -07:00
2024-07-15 09:05:42 -07:00
2023-09-28 14:10:07 -07:00
2023-03-14 15:25:50 -07:00
2023-03-14 15:59:58 -07:00
2023-06-09 10:12:52 -07:00
2022-03-15 15:13:42 -07:00
2022-01-12 16:14:36 -08:00
2024-04-09 16:23:19 -07:00
2019-06-19 09:48:12 -07:00
2022-03-15 15:13:42 -07:00
2023-11-08 10:19:41 -08:00
2023-03-14 15:25:50 -07:00
2023-03-14 15:25:50 -07:00
2022-09-02 13:31:19 -07:00
2024-05-29 10:49:11 -07:00
2024-07-29 14:47:01 -07:00
2024-05-29 10:49:11 -07:00
2022-11-29 09:26:03 -08:00