mirror of
https://github.com/opnsense/src.git
synced 2026-06-11 09:41:03 -04:00
MFV r258377: 4088 use after free in arc_release()
illumos/illumos-gate@ccc22e1304 MFC after: 5 days
This commit is contained in:
commit
c5f4a0a2eb
1 changed files with 1 additions and 1 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue