id,summary,reporter,owner,description,type,status,priority,milestone,component,version,resolution,keywords,cc 780,smartmontools triggers kernel panic on INVARIANTS enabled FreeBSD kernel after r308351 in base,op_hardenedbsd,,"Details from ports patch - https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=215356 smartmontools: fix panic on INVARIANTS enabled kernel after r308351 in base After r308351 commit the INVARIANTS enabled kernel gets too ""eager"" when checking the cam ccb flags. But the real problem was not the previous, but the smartmontools does not zeroed out the ccb on stack, and pass this dirty ccb to kernel, which is catched by an ASSERT. So fix this by filling up with 0 this ccb. This commit is similar, what's happen in r307684 in camcontrol. So this is the same followup patch in smartmontools. https://svnweb.freebsd.org/base?view=revision&revision=307684 https://svnweb.freebsd.org/base?view=revision&revision=308351 Sponsored-by: opBSD op@opn ~> smartctl --version smartctl 6.5 2016-05-07 r4318 [FreeBSD 11.0-STABLE-HBSD amd64] (local build) Copyright (C) 2002-16, Bruce Allen, Christian Franke, www.smartmontools.org smartctl comes with ABSOLUTELY NO WARRANTY. This is free software, and you are welcome to redistribute it under the terms of the GNU General Public License; either version 2, or (at your option) any later version. See http://www.gnu.org for further details. smartmontools release 6.5 dated 2016-05-07 at 11:17:46 UTC smartmontools SVN rev 4318 dated 2016-05-07 at 11:18:20 smartmontools build host: amd64-portbld-freebsd11.0 smartmontools build with: C++98, GCC 4.2.1 Compatible FreeBSD Clang 3.8.0 (tags/RELEASE_380/final 262564) smartmontools configure arguments: '--disable-dependency-tracking' '--enable-sample' '--with-nvme-devicescan=yes' '--with-initscriptdir=/usr/local/etc/rc.d' '--prefix=/usr/local' '--localstatedir=/var' '--mandir=/usr/local/man' '--disable-silent-rules' '--infodir=/usr/local/info/' '--build=amd64-portbld-freebsd11.0' 'build_alias=amd64-portbld-freebsd11.0' 'CXX=c++' 'CXXFLAGS=-O2 -pipe -pipe -DHARDENEDBSD -fstack-protector -fno-strict-aliasing -DHARDENEDBSD' 'LDFLAGS= -fstack-protector' 'LIBS=' 'CPPFLAGS=' 'CC=cc' 'CFLAGS=-O2 -pipe -pipe -DHARDENEDBSD -fstack-protector -fno-strict-aliasing'",defect,closed,blocker,Release 6.6,all,6.5,fixed,freebsd,