From owner-svn-src-head@FreeBSD.ORG Tue Jan 7 11:03:58 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 28843220; Tue, 7 Jan 2014 11:03:58 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 147A91B20; Tue, 7 Jan 2014 11:03:58 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s07B3vBD066358; Tue, 7 Jan 2014 11:03:57 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s07B3vV7066357; Tue, 7 Jan 2014 11:03:57 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201401071103.s07B3vV7066357@svn.freebsd.org> From: Edward Tomasz Napierala Date: Tue, 7 Jan 2014 11:03:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r260389 - head/sys/dev/iscsi 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.17 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, 07 Jan 2014 11:03:58 -0000 Author: trasz Date: Tue Jan 7 11:03:57 2014 New Revision: 260389 URL: http://svnweb.freebsd.org/changeset/base/260389 Log: Fix a rare "truncated checksums" problem, which manifested like this: WARNING: icl_pdu_check_data_digest: data digest check failed; got 0xf23b, should be 0xdb7f23b Tested by: Darcy Birkbeck MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Modified: head/sys/dev/iscsi/icl.c Modified: head/sys/dev/iscsi/icl.c ============================================================================== --- head/sys/dev/iscsi/icl.c Tue Jan 7 09:52:26 2014 (r260388) +++ head/sys/dev/iscsi/icl.c Tue Jan 7 11:03:57 2014 (r260389) @@ -324,7 +324,7 @@ icl_pdu_check_header_digest(struct icl_p } CTASSERT(sizeof(received_digest) == ISCSI_HEADER_DIGEST_SIZE); - memcpy(&received_digest, mtod(m, void *), ISCSI_HEADER_DIGEST_SIZE); + m_copydata(m, 0, ISCSI_HEADER_DIGEST_SIZE, (void *)&received_digest); m_freem(m); *availablep -= ISCSI_HEADER_DIGEST_SIZE; @@ -482,7 +482,7 @@ icl_pdu_check_data_digest(struct icl_pdu } CTASSERT(sizeof(received_digest) == ISCSI_DATA_DIGEST_SIZE); - memcpy(&received_digest, mtod(m, void *), ISCSI_DATA_DIGEST_SIZE); + m_copydata(m, 0, ISCSI_DATA_DIGEST_SIZE, (void *)&received_digest); m_freem(m); *availablep -= ISCSI_DATA_DIGEST_SIZE;