[Bug 202358] [patch] [zfs] fix possible assert fail in sa_handle_get_from_db()
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Sun Aug 16 11:09:20 UTC 2015
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=202358
Bug ID: 202358
Summary: [patch] [zfs] fix possible assert fail in
sa_handle_get_from_db()
Product: Base System
Version: 11.0-CURRENT
Hardware: Any
OS: Any
Status: New
Keywords: patch
Severity: Affects Only Me
Priority: ---
Component: kern
Assignee: freebsd-bugs at FreeBSD.org
Reporter: luke.tw at gmail.com
Keywords: patch
Created attachment 159915
--> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=159915&action=edit
patch for sa.c
After r286575, there is a possible assert fail in:
sa_handle_get_from_db() -> dmu_buf_init_user() -> ASSERT(dbu->dbu_evict_func
== NULL);
When the sa_cache zone first allocates memory from VM,
sa_cache_constructor() does not initialize the dbu_evict_func that contains
garbage.
This will trigger the assert.
Only after the memory is freed, the sa_cache_destructor() set dbu_evict_func to
NULL and returns it to the zone for next use.
So, the next time sa_handle_get_from_db() allocates the same memory from the
zone, the dbu_evict_func is NULL.
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the freebsd-bugs
mailing list