Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 24 Nov 2009 03:38:42 +0000 (UTC)
From:      Marcel Moolenaar <marcel@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
Subject:   svn commit: r199733 - stable/8/sys/nfsserver
Message-ID:  <200911240338.nAO3cgM9004367@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200911240338.nAO3cgM9004367>