summaryrefslogtreecommitdiffstats
path: root/include/sys/dmu.h
diff options
context:
space:
mode:
authorJustin T. Gibbs <[email protected]>2015-04-02 22:59:15 +1100
committerBrian Behlendorf <[email protected]>2015-04-28 16:25:44 -0700
commit6ebebaceb1091142b81430291c610d79b6a3073e (patch)
tree70197ad52e7d910f4a860dcfc1d475aa5d073efc /include/sys/dmu.h
parent0c66c32d1d8b64a261cceb5f50a9e86777c5d0b2 (diff)
Illumos 5531 - NULL pointer dereference in dsl_prop_get_ds()
5531 NULL pointer dereference in dsl_prop_get_ds() Author: Justin T. Gibbs <[email protected]> Reviewed by: Matthew Ahrens <[email protected]> Reviewed by: Dan McDonald <[email protected]> Reviewed by: George Wilson <[email protected]> Reviewed by: Bayard Bell <[email protected]> Approved by: Robert Mustacchi <[email protected]> References: https://www.illumos.org/issues/5531 https://github.com/illumos/illumos-gate/commit/e57a022 Ported-by: Chris Dunlop <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]>
Diffstat (limited to 'include/sys/dmu.h')
-rw-r--r--include/sys/dmu.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/include/sys/dmu.h b/include/sys/dmu.h
index b2f1efae0..aa3e89d60 100644
--- a/include/sys/dmu.h
+++ b/include/sys/dmu.h
@@ -454,7 +454,23 @@ int dmu_spill_hold_existing(dmu_buf_t *bonus, void *tag, dmu_buf_t **dbp);
*/
int dmu_buf_hold(objset_t *os, uint64_t object, uint64_t offset,
void *tag, dmu_buf_t **, int flags);
+
+/*
+ * Add a reference to a dmu buffer that has already been held via
+ * dmu_buf_hold() in the current context.
+ */
void dmu_buf_add_ref(dmu_buf_t *db, void* tag);
+
+/*
+ * Attempt to add a reference to a dmu buffer that is in an unknown state,
+ * using a pointer that may have been invalidated by eviction processing.
+ * The request will succeed if the passed in dbuf still represents the
+ * same os/object/blkid, is ineligible for eviction, and has at least
+ * one hold by a user other than the syncer.
+ */
+boolean_t dmu_buf_try_add_ref(dmu_buf_t *, objset_t *os, uint64_t object,
+ uint64_t blkid, void *tag);
+
void dmu_buf_rele(dmu_buf_t *db, void *tag);
uint64_t dmu_buf_refcount(dmu_buf_t *db);