summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/NCR_D700.c
diff options
context:
space:
mode:
authorChuck Lever <chuck.lever@oracle.com>2012-03-02 17:14:31 -0500
committerTrond Myklebust <Trond.Myklebust@netapp.com>2012-03-06 10:32:48 -0500
commitcd93710e8d290711ba2e08e1d1a380013aad667d (patch)
tree28f1a04dabfa3eaa64b61ea4491654e9ba70d889 /drivers/scsi/NCR_D700.c
parentab19b4813fdbdef8f9c8732d1f7a2a69ae78d00b (diff)
downloadlinux-cd93710e8d290711ba2e08e1d1a380013aad667d.tar.bz2
NFS: Fix nfs4_verifier memory alignment
Clean up due to code review. The nfs4_verifier's data field is not guaranteed to be u32-aligned. Casting an array of chars to a u32 * is considered generally hazardous. Fix this by using a __be32 array to generate a verifier's contents, and then byte-copy the contents into the verifier field. The contents of a verifier, for all intents and purposes, are opaque bytes. Only local code that generates a verifier need know the actual content and format. Everyone else compares the full byte array for exact equality. Also, sizeof(nfs4_verifer) is the size of the in-core verifier data structure, but NFS4_VERIFIER_SIZE is the number of octets in an XDR'd verifier. The two are not interchangeable, even if they happen to have the same value. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'drivers/scsi/NCR_D700.c')
0 files changed, 0 insertions, 0 deletions