[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAFULd4Ya1Me0+-cnmVKBAxcJJfiEbzk+_AavM7vyJksUaOtnGQ@mail.gmail.com>
Date: Mon, 21 Jul 2025 19:47:37 +0200
From: Uros Bizjak <ubizjak@...il.com>
To: linux-kernel@...r.kernel.org
Cc: "Eric W. Biederman" <ebiederm@...ssion.com>, Andrew Morton <akpm@...ux-foundation.org>,
Sebastian Andrzej Siewior <bigeasy@...utronix.de>, "Paul E. McKenney" <paulmck@...nel.org>,
Alexey Gladkov <legion@...nel.org>, Roman Gushchin <roman.gushchin@...ux.dev>,
MengEn Sun <mengensun@...cent.com>, Thomas Weißschuh <linux@...ssschuh.net>
Subject: Re: [PATCH RESEND 1/2] ucount: Fix atomic_long_inc_below argument typei()
Sorry, patches in this series have some problems in their description,
please expect v2.
Uros.
On Mon, Jul 21, 2025 at 7:42 PM Uros Bizjak <ubizjak@...il.com> wrote:
>
> The type of u argument of atomic_long_inc_below() should be long
> to avoid unwanted truncation to int.
>
> Fixes: f9c82a4ea89c ("Increase size of ucounts to atomic_long_t")
> Signed-off-by: Uros Bizjak <ubizjak@...il.com>
> Reviewed-by: "Eric W. Biederman" <ebiederm@...ssion.com>
> Cc: Andrew Morton <akpm@...ux-foundation.org>
> Cc: Sebastian Andrzej Siewior <bigeasy@...utronix.de>
> Cc: "Paul E. McKenney" <paulmck@...nel.org>
> Cc: Alexey Gladkov <legion@...nel.org>
> Cc: Roman Gushchin <roman.gushchin@...ux.dev>
> Cc: MengEn Sun <mengensun@...cent.com>
> Cc: "Thomas Weißschuh" <linux@...ssschuh.net>
> ---
> kernel/ucount.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/kernel/ucount.c b/kernel/ucount.c
> index 8686e329b8f2..f629db485a07 100644
> --- a/kernel/ucount.c
> +++ b/kernel/ucount.c
> @@ -199,7 +199,7 @@ void put_ucounts(struct ucounts *ucounts)
> }
> }
>
> -static inline bool atomic_long_inc_below(atomic_long_t *v, int u)
> +static inline bool atomic_long_inc_below(atomic_long_t *v, long u)
> {
> long c, old;
> c = atomic_long_read(v);
> --
> 2.50.1
>
Powered by blists - more mailing lists