Skip to content

Commit 0ef1351

Browse files
dhowellstorvalds
authored andcommitted
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 <[email protected]> Signed-off-by: David Howells <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
1 parent 1aab4d7 commit 0ef1351

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

fs/afs/main.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,13 +55,13 @@ static int __init afs_get_client_UUID(void)
5555
afs_uuid.time_low = uuidtime;
5656
afs_uuid.time_mid = uuidtime >> 32;
5757
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;
5959

6060
get_random_bytes(&clockseq, 2);
6161
afs_uuid.clock_seq_low = clockseq;
6262
afs_uuid.clock_seq_hi_and_reserved =
6363
(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;
6565

6666
_debug("AFS UUID: %08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x",
6767
afs_uuid.time_low,

0 commit comments

Comments
 (0)