diff options
author | Paul Saab <ps@FreeBSD.org> | 2005-07-14 20:08:27 +0000 |
---|---|---|
committer | Paul Saab <ps@FreeBSD.org> | 2005-07-14 20:08:27 +0000 |
commit | 0e38f5365b47dd3f8afa14525fc5078afa8ea033 (patch) | |
tree | cea0925fcb3fee95388e7d022a1a58a965f2f200 /sys/nfs/nfs_common.h | |
parent | 37b40e499ea8752896bc78a37946067d58e69781 (diff) | |
download | src-0e38f5365b47dd3f8afa14525fc5078afa8ea033.tar.gz src-0e38f5365b47dd3f8afa14525fc5078afa8ea033.zip |
Fixes for NFS crashes on architectures that require strict alignment.
- Fix nfsm_disct() so that after pulling up data, the remaining data
is aligned if necessary.
- Fix nfs_clnt_tcp_soupcall() to bcopy() the rpc length out of the
mbuf (instead of casting m_data to a uint32).
Submitted by: Pyun YongHyeon
Reviewed by: Mohan Srinivasan
Notes
Notes:
svn path=/head/; revision=148008
Diffstat (limited to 'sys/nfs/nfs_common.h')
-rw-r--r-- | sys/nfs/nfs_common.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sys/nfs/nfs_common.h b/sys/nfs/nfs_common.h index 32ce4afb35c3..7c0613095939 100644 --- a/sys/nfs/nfs_common.h +++ b/sys/nfs/nfs_common.h @@ -127,4 +127,10 @@ do { \ nfsm_dcheck(t1, mrep); \ } while (0) +#ifdef __NO_STRICT_ALIGNMENT +#define nfsm_aligned(p, t) 1 +#else +#define nfsm_aligned(p, t) ((((u_long)(p)) & (sizeof(t) - 1)) == 0) +#endif + #endif |