FreeBSD src
Go to file
Andriy Gapon c9327351e8 7869 panic in bpobj_space(): null pointer dereference
illumos/illumos-gate@a3905a4592
a3905a4592

https://www.illumos.org/issues/7869
  The issue fixed by this patch is a race condition in the deadlist code.
  A thread executing an administrative command that uses
  `dsl_deadlist_space_range()` holds the lock of the whole `deadlist_t` to
  protect the access of all its entries that the deadlist contains in an
  avl tree.
  Sync threads trying to insert a new entry in the deadlist
  (through `dsl_deadlist_insert()` -> `dle_enqueue()`) do not hold the
  deadlist lock at that moment. If the `dle_bpobj` is the empty bpobj (our
  sentinel value), we close and reopen it. Between these two operations,
  it is possible for the `dsl_deadlist_space_range()` thread to dereference
  that bpobj which is `NULL` during that window.
  Threads should hold the a deadlist's `dl_lock` when they manipulate its
  internal data so scenarios like the one above are avoided. In addition,
  threads should also hold the bpobj lock whenever they are allocating the
  subobj list of a bpobj, and not just when they actually insert the subobj
  to the list. This way we can avoid potential memory leaks.

Reviewed by: Matt Ahrens <mahrens@delphix.com>
Reviewed by: Dan Kimmel <dan.kimmel@delphix.com>
Reviewed by: Steve Gonczi <steve.gonczi@delphix.com>
Reviewed by: John Kennedy <john.kennedy@delphix.com>
Reviewed by: George Melikov <mail@gmelikov.ru>
Reviewed by: Brian Behlendorf <behlendorf1@llnl.gov>
Approved by: Dan McDonald <danmcd@omniti.com>
Author: Serapheim Dimitropoulos <serapheim@delphix.com>
2017-04-14 18:24:38 +00:00
cmd 7252 7628 compressed zfs send / receive 2017-04-14 18:07:43 +00:00
common 7812 Remove gender specific language 2017-04-14 18:22:42 +00:00
head 5066 remove support for non-ANSI compilation 2014-08-20 06:29:42 +00:00
lib 7803 want devid_str_from_path(3devid) 2017-04-14 18:21:58 +00:00
man 7252 7628 compressed zfs send / receive 2017-04-14 18:07:43 +00:00
tools/ctf 5589 improper use of NULL in tools/ctf 2015-03-09 20:43:14 +00:00
uts 7869 panic in bpobj_space(): null pointer dereference 2017-04-14 18:24:38 +00:00
OPENSOLARIS.LICENSE Update vendor/opensolaris to last OpenSolaris state (13149:b23a4dab3d50) 2012-07-18 07:48:04 +00:00