From d99afb2c92618cf56790c05c9fb2447b7414c4af Mon Sep 17 00:00:00 2001 From: fabient Date: Fri, 25 Nov 2016 17:20:23 +0000 Subject: [PATCH] Update r309143 to prevent false sharing. Reported by: mjg Approved by: so MFC after: 1 month --- sys/libkern/arc4random.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/libkern/arc4random.c b/sys/libkern/arc4random.c index b5341179ac92..86431002ba89 100644 --- a/sys/libkern/arc4random.c +++ b/sys/libkern/arc4random.c @@ -31,13 +31,13 @@ int arc4rand_iniseed_state = ARC4_ENTR_NONE; MALLOC_DEFINE(M_ARC4RANDOM, "arc4random", "arc4random structures"); struct arc4_s { + struct mtx mtx; u_int8_t i, j; int numruns; u_int8_t sbox[256]; time_t t_reseed; - struct mtx mtx; -}; +} __aligned(CACHE_LINE_SIZE); static struct arc4_s *arc4inst = NULL;