]> granicus.if.org Git - zfs/commitdiff
Apply Ricardo's spl-02-condvar-poison.patch
authorbehlendo <behlendo@7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c>
Mon, 4 Aug 2008 23:59:08 +0000 (23:59 +0000)
committerbehlendo <behlendo@7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c>
Mon, 4 Aug 2008 23:59:08 +0000 (23:59 +0000)
Fix too early memory poisoning on condvars.

git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@147 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

modules/spl/spl-condvar.c

index 79a047b197396076ab101bebd28cc6ea99b06020..163f2a1de754f6c6c78027659d3035f700fc263a 100644 (file)
@@ -78,8 +78,8 @@ __cv_destroy(kcondvar_t *cvp)
        if (cvp->cv_name)
                kmem_free(cvp->cv_name, cvp->cv_name_size);
 
-       memset(cvp, CV_POISON, sizeof(*cvp));
        spin_unlock(&cvp->cv_lock);
+       memset(cvp, CV_POISON, sizeof(*cvp));
        EXIT;
 }
 EXPORT_SYMBOL(__cv_destroy);