Re: [PATCH] random: fix inconsistent spinlock usage

From: Theodore Y. Ts'o
Date: Sat Feb 16 2019 - 13:00:04 EST


On Fri, Feb 15, 2019 at 02:03:06PM -0800, Sultan Alsawaf wrote:
> All users of the struct entropy_store spinlock use the irqsave spinlock variant.
> Spinlock users of the same lock should use be consistent in their use of a
> certain spinlock primitive, which makes add_interrupt_randomness()'s spinlock
> usage incorrect.
>
> Fix the inconsistency by converting add_interrupt_randomness()'s spinlocks to
> use the irqsave primitive.
>
> Signed-off-by: Sultan Alsawaf <sultan@xxxxxxxxxxxxxxx>

This isn't a problem; interrupts are off by definition when
add_interrupt_randomness() is called so there's no point using the
irqsave version.

Also, please note that your patches are whitespace damaged, so they
can't be applied directly. You may want to look into how you are
sending your patches.

Regards,

- Ted