aboutsummaryrefslogtreecommitdiffstats
path: root/fs/afs/main.c
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2014-07-29 12:53:23 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2014-07-29 13:14:36 -0400
commit0ef135152353d323daa1fef2db94a23e9ae31fb6 (patch)
tree99d09dd2ba32cb98c20e14f5c7d0e8f81f7d92dc /fs/afs/main.c
parent1aab4d772ece470135bee47529d3f7c6d68609fa (diff)
AFS: Correctly assemble the client UUID
Correctly assemble the client UUID by OR'ing in the flags rather than assigning them over the other components. Reported-by: Himangi Saraogi <himangi774@gmail.com> Signed-off-by: David Howells <dhowells@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/afs/main.c')
-rw-r--r--fs/afs/main.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/afs/main.c b/fs/afs/main.c
index 42dd2e499ed8..35de0c04729f 100644
--- a/fs/afs/main.c
+++ b/fs/afs/main.c
@@ -55,13 +55,13 @@ static int __init afs_get_client_UUID(void)
55 afs_uuid.time_low = uuidtime; 55 afs_uuid.time_low = uuidtime;
56 afs_uuid.time_mid = uuidtime >> 32; 56 afs_uuid.time_mid = uuidtime >> 32;
57 afs_uuid.time_hi_and_version = (uuidtime >> 48) & AFS_UUID_TIMEHI_MASK; 57 afs_uuid.time_hi_and_version = (uuidtime >> 48) & AFS_UUID_TIMEHI_MASK;
58 afs_uuid.time_hi_and_version = AFS_UUID_VERSION_TIME; 58 afs_uuid.time_hi_and_version |= AFS_UUID_VERSION_TIME;
59 59
60 get_random_bytes(&clockseq, 2); 60 get_random_bytes(&clockseq, 2);
61 afs_uuid.clock_seq_low = clockseq; 61 afs_uuid.clock_seq_low = clockseq;
62 afs_uuid.clock_seq_hi_and_reserved = 62 afs_uuid.clock_seq_hi_and_reserved =
63 (clockseq >> 8) & AFS_UUID_CLOCKHI_MASK; 63 (clockseq >> 8) & AFS_UUID_CLOCKHI_MASK;
64 afs_uuid.clock_seq_hi_and_reserved = AFS_UUID_VARIANT_STD; 64 afs_uuid.clock_seq_hi_and_reserved |= AFS_UUID_VARIANT_STD;
65 65
66 _debug("AFS UUID: %08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x", 66 _debug("AFS UUID: %08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x",
67 afs_uuid.time_low, 67 afs_uuid.time_low,