svn commit: r199733 - stable/8/sys/nfsserver

Marcel Moolenaar marcel at FreeBSD.org
Tue Nov 24 03:38:42 UTC 2009


Author: marcel
Date: Tue Nov 24 03:38:42 2009
New Revision: 199733
URL: http://svn.freebsd.org/changeset/base/199733

Log:
  MFC r199274, r199284:
  Fix an obvious panic by not casting from a pointer that is 4-bytes
  alignment to a type that needs 8-byte alignment, and thus causing
  misaligned memory references.

Modified:
  stable/8/sys/nfsserver/nfs_fha.c
Directory Properties:
  stable/8/sys/   (props changed)

Modified: stable/8/sys/nfsserver/nfs_fha.c
==============================================================================
--- stable/8/sys/nfsserver/nfs_fha.c	Tue Nov 24 03:32:42 2009	(r199732)
+++ stable/8/sys/nfsserver/nfs_fha.c	Tue Nov 24 03:38:42 2009	(r199733)
@@ -206,7 +206,7 @@ fha_extract_info(struct svc_req *req, st
 	if (error)
 		goto out;
 
-	i->fh = *(const u_int64_t *)(fh.fh_generic.fh_fid.fid_data);
+	bcopy(fh.fh_generic.fh_fid.fid_data, &i->fh, sizeof(i->fh));
 
 	/* Content ourselves with zero offset for all but reads. */
 	if (procnum != NFSPROC_READ)


More information about the svn-src-stable-8 mailing list