Module Name: src Committed By: fox Date: Mon Mar 9 15:40:50 UTC 2020
Modified Files: src/external/cddl/osnet/dist/uts/common/fs/zfs: metaslab.c Log Message: external/cddl/osnet: Fix possible null pointer access. Detected by UBSan and fixed upstream, pick only the fix from the commit. Cherry-pick: >From 928e8ad47d3478a3d5d01f0dd6ae74a9371af65e Mon Sep 17 00:00:00 2001 From: Serapheim Dimitropoulos <seraphe...@gmail.com> Date: Wed, 20 Feb 2019 09:59:57 -0800 Subject: [PATCH] Introduce auxiliary metaslab histograms Reviewed by: Paul Dagnelie <p...@delphix.com> Reviewed-by: Brian Behlendorf <behlendo...@llnl.gov> Reviewed by: Matt Ahrens <mahr...@delphix.com> Signed-off-by: Serapheim Dimitropoulos <seraph...@delphix.com> Closes #8358 Reviewed by: kamil@ To generate a diff of this commit: cvs rdiff -u -r1.1.1.3 -r1.2 \ src/external/cddl/osnet/dist/uts/common/fs/zfs/metaslab.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/external/cddl/osnet/dist/uts/common/fs/zfs/metaslab.c diff -u src/external/cddl/osnet/dist/uts/common/fs/zfs/metaslab.c:1.1.1.3 src/external/cddl/osnet/dist/uts/common/fs/zfs/metaslab.c:1.2 --- src/external/cddl/osnet/dist/uts/common/fs/zfs/metaslab.c:1.1.1.3 Mon May 28 20:52:58 2018 +++ src/external/cddl/osnet/dist/uts/common/fs/zfs/metaslab.c Mon Mar 9 15:40:50 2020 @@ -3370,7 +3370,7 @@ metaslab_alloc(spa_t *spa, metaslab_clas zio_alloc_list_t *zal, zio_t *zio) { dva_t *dva = bp->blk_dva; - dva_t *hintdva = hintbp->blk_dva; + dva_t *hintdva = (hintbp != NULL) ? hintbp->blk_dva : NULL; int error = 0; ASSERT(bp->blk_birth == 0);