diff options
author | avg <avg@FreeBSD.org> | 2013-11-25 17:19:05 +0000 |
---|---|---|
committer | avg <avg@FreeBSD.org> | 2013-11-25 17:19:05 +0000 |
commit | 5ba4ab7a7f1f481a12043e2c8e583807d42b6109 (patch) | |
tree | 0384262b8ec52143003a96db726e89d5a0b89cc1 /sys/cddl/contrib/opensolaris/uts | |
parent | df50cf195b82cc4c361d45e9444306719ea6620e (diff) | |
download | FreeBSD-src-5ba4ab7a7f1f481a12043e2c8e583807d42b6109.zip FreeBSD-src-5ba4ab7a7f1f481a12043e2c8e583807d42b6109.tar.gz |
MFV r258377: 4088 use after free in arc_release()
illumos/illumos-gate@ccc22e130479b5bd7c0002267fee1e0602d3f772
Approved by: re (gjb)
Diffstat (limited to 'sys/cddl/contrib/opensolaris/uts')
-rw-r--r-- | sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c index 505c7c5..0b6a77d 100644 --- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c +++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c @@ -3540,6 +3540,7 @@ arc_release(arc_buf_t *buf, void *tag) if (l2hdr) { mutex_enter(&l2arc_buflist_mtx); hdr->b_l2hdr = NULL; + list_remove(l2hdr->b_dev->l2ad_buflist, hdr); } buf_size = hdr->b_size; @@ -3627,7 +3628,6 @@ arc_release(arc_buf_t *buf, void *tag) ARCSTAT_INCR(arcstat_l2_asize, -l2hdr->b_asize); trim_map_free(l2hdr->b_dev->l2ad_vdev, l2hdr->b_daddr, hdr->b_size, 0); - list_remove(l2hdr->b_dev->l2ad_buflist, hdr); kmem_free(l2hdr, sizeof (l2arc_buf_hdr_t)); ARCSTAT_INCR(arcstat_l2_size, -buf_size); mutex_exit(&l2arc_buflist_mtx); |