NETAPP has added a check for all private zones with trash_ctor/trash_dtor.
They pass the trash_ctor/trash_dtor to uma_zcreate(9) if it is called
with NULL for constructor/destructor.
This patch is contributed by Suresh Gumpula at Netapp.
Differential D2725
Add extra INVARIANTS check for ctor/dtor jmg on Jun 3 2015, 3:26 PM. Authored by Tags None Referenced Files
Details NETAPP has added a check for all private zones with trash_ctor/trash_dtor. This patch is contributed by Suresh Gumpula at Netapp.
Diff Detail
Event Timeline
Comment Actions Reduce a little the width of the comments. It all looks weird While here I should mention this is not tested at all, I am Comment Actions The mtx init code is assuming the object being initialized with zeros. Please make this change too in v_addpollinfo() in Please replace this line Just to mention. This patch is in our product for almost a month without any issue in our testing. And we found couple of issues. And this mutex issue in v_addpollinfo() is uncovered recently when a tail -f command is run. Comment Actions M_ZERO uma_zalloc() in v_addpollinfo(). (submitted by Suresh) It wouldn't hurt to commit this before the extra invariant check, but Comment Actions We have not seen any side effect other than this mutex issue for a month+ invariant build testing. I am thinking its good to go now. Comment Actions We uncovered/realized this bug and others only after we committed this patch. So I think its really a useful check to have in .
Comment Actions I trust Suresh has tested the change very well and the check has proven useful. I am adding the reviewers of D2079 since it was found using this patch.
Comment Actions mtrash_ctor() on standard malloc zones also panics if it detects use after free unconditionally. So may be its good to keep both in sync instead of a panic knob with sysctl/options.
Comment Actions remove the vfs change as it has already been committed... This patch will be Comment Actions INVARIANTS already covers this. If you didn't want your machine to panic when it detects code failures, you shouldn't have compiled w/ INVARIANTS. :) |