Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 16 Aug 2015 11:09:20 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-bugs@FreeBSD.org
Subject:   [Bug 202358] [patch] [zfs] fix possible assert fail in sa_handle_get_from_db()
Message-ID:  <bug-202358-8@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
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@FreeBSD.org
          Reporter: luke.tw@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.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-202358-8>