Lines Matching full:generation
133 * @rng_info->generation must always be read here, as it serializes @state->key with the in __cvdso_getrandom_data()
136 current_generation = READ_ONCE(rng_info->generation); in __cvdso_getrandom_data()
139 * If @state->generation doesn't match the kernel RNG's generation, then it means the in __cvdso_getrandom_data()
142 if (unlikely(state->generation != current_generation)) { in __cvdso_getrandom_data()
144 * Write the generation before filling the key, in case of fork. If there is a fork in __cvdso_getrandom_data()
148 * generation counter, so the fork would not be detected. Therefore, write in __cvdso_getrandom_data()
149 * @state->generation before the call to the getrandom syscall. in __cvdso_getrandom_data()
151 WRITE_ONCE(state->generation, current_generation); in __cvdso_getrandom_data()
155 * smp_store_release(&_vdso_rng_data.generation) in random.c. in __cvdso_getrandom_data()
163 * invalid, so invalidate the generation so that it is not used again, and in __cvdso_getrandom_data()
166 WRITE_ONCE(state->generation, 0); in __cvdso_getrandom_data()
201 /* Prevent the loop from being reordered wrt ->generation. */ in __cvdso_getrandom_data()
205 * Since @rng_info->generation will never be 0, re-read @state->generation, rather in __cvdso_getrandom_data()
211 if (unlikely(READ_ONCE(state->generation) != READ_ONCE(rng_info->generation))) { in __cvdso_getrandom_data()