Re: [PATCH 7/9] random: forget lock in lockless accounting

From: Theodore Ts'o
Date: Fri Nov 29 2013 - 20:10:32 EST


On Wed, Nov 13, 2013 at 03:08:28AM -0500, Greg Price wrote:
> The only mutable data accessed here is ->entropy_count, but since
> 902c098a3 ("random: use lockless techniques in the interrupt path")
> that member isn't protected by the lock anyway. Since 10b3a32d2
> ("random: fix accounting race condition") we use cmpxchg to protect
> our accesses to ->entropy_count here. Drop the use of the lock.

Applied, with a slight change to clarify the commit description:

The only mutable data accessed here is ->entropy_count, but since
10b3a32d2 ("random: fix accounting race condition") we use cmpxchg to
protect our accesses to ->entropy_count here. Drop the use of the
lock.

Thanks!

- Ted
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/