HomeFreeBSD

linux/zvol_os: don't try to set disk ops if alloc fails

Description

linux/zvol_os: don't try to set disk ops if alloc fails

If the kernel fails to allocate the gendisk, zvo_disk will be NULL, and
derefencing it will explode. So don't do that.

Sponsored-by: Klara, Inc.
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Alexander Motin <mav@FreeBSD.org>
Reviewed-by: Tony Hutter <hutter2@llnl.gov>
Signed-off-by: Rob Norris <rob.norris@klarasystems.com>
Closes #17396

Details

Provenance
rob.norris_klarasystems.comAuthored on May 30 2025, 2:25 PM
Brian Behlendorf <behlendorf1@llnl.gov>Committed on Jun 3 2025, 11:16 PM
Parents
rG023a43253c3b: ZTS: testing for leaked key mappings in encrypted non-raw send
Branches
Unknown
Tags
Unknown