Re: [PATCH] semaphore: Add might_sleep() to down_*() family

From: Will Deacon
Date: Fri Aug 13 2021 - 10:43:14 EST


On Mon, Aug 09, 2021 at 10:12:15AM +0800, Xiaoming Ni wrote:
> Semaphore is sleeping lock. Add might_sleep() to down*() family
> (with exception of down_trylock()) to detect atomic context sleep.
>
> Previously discussed with Peter Zijlstra, see link:
> https://lore.kernel.org/lkml/20210806082320.GD22037@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

You can use a Link: tag here.

> Signed-off-by: Xiaoming Ni <nixiaoming@xxxxxxxxxx>
> ---
> kernel/locking/semaphore.c | 4 ++++
> 1 file changed, 4 insertions(+)

Acked-by: Will Deacon <will@xxxxxxxxxx>

Will