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: [email protected]
          Reporter: [email protected]
          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.
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "[email protected]"

Reply via email to