datto / dattobd

kernel module for taking block-level snapshots and incremental backups of Linux block devices
GNU General Public License v2.0
560 stars 120 forks source link

fix free_request_tracking_ptr set dev->sd_orig_request_fn as null #378

Open hongyuntw opened 5 days ago

hongyuntw commented 5 days ago

If we are using submit_bio kernel version, we also need to reset sd_orig_request_fn to null when dattobd_free_request_tracking_ptr is called. Since __tracer_destroy_tracing determined to do destroy traced or not by checking if sd_orig_request_fn is a nullptr, not doing this might cause a kernel panic due to double destroy cases.