Date: Tue, 11 Feb 2014 12:01:11 +0000 (UTC) From: Edward Tomasz Napierala <trasz@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r261771 - stable/10/sys/dev/iscsi Message-ID: <201402111201.s1BC1BYO068610@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: trasz Date: Tue Feb 11 12:01:11 2014 New Revision: 261771 URL: http://svnweb.freebsd.org/changeset/base/261771 Log: MFC r260389: 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 Sponsored by: The FreeBSD Foundation Modified: stable/10/sys/dev/iscsi/icl.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/iscsi/icl.c ============================================================================== --- stable/10/sys/dev/iscsi/icl.c Tue Feb 11 11:58:54 2014 (r261770) +++ stable/10/sys/dev/iscsi/icl.c Tue Feb 11 12:01:11 2014 (r261771) @@ -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;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201402111201.s1BC1BYO068610>