From owner-svn-src-head@freebsd.org Tue Apr 18 21:05:06 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7F94BD44576; Tue, 18 Apr 2017 21:05:06 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4FFD3C7; Tue, 18 Apr 2017 21:05:06 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v3IL55GH099546; Tue, 18 Apr 2017 21:05:05 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3IL559C099545; Tue, 18 Apr 2017 21:05:05 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201704182105.v3IL559C099545@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Tue, 18 Apr 2017 21:05:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r317104 - head/sys/cam/scsi X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Apr 2017 21:05:06 -0000 Author: cem Date: Tue Apr 18 21:05:05 2017 New Revision: 317104 URL: https://svnweb.freebsd.org/changeset/base/317104 Log: da(4): Fix a TRIM regression introduced in r308155 According to Warner, multiple TRIM BIOs are collapsed into a single CCB with NULL bp. It is invalid to biotrack() NULL, and results in a fault. So, don't do that. Reported by: asomers@ Sponsored by: Dell EMC Isilon Modified: head/sys/cam/scsi/scsi_da.c Modified: head/sys/cam/scsi/scsi_da.c ============================================================================== --- head/sys/cam/scsi/scsi_da.c Tue Apr 18 20:31:02 2017 (r317103) +++ head/sys/cam/scsi/scsi_da.c Tue Apr 18 21:05:05 2017 (r317104) @@ -4169,7 +4169,8 @@ dadone(struct cam_periph *periph, union } } - biotrack(bp, __func__); + if (bp != NULL) + biotrack(bp, __func__); LIST_REMOVE(&done_ccb->ccb_h, periph_links.le); if (LIST_EMPTY(&softc->pending_ccbs)) softc->flags |= DA_FLAG_WAS_OTAG;