[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <aYQubHP2hsTUNik2@stanley.mountain>
Date: Thu, 5 Feb 2026 08:45:16 +0300
From: Dan Carpenter <dan.carpenter@...aro.org>
To: Minu Jin <s9430939@...er.com>
Cc: gregkh@...uxfoundation.org, christian.gromm@...rochip.com,
parthiban.veerasooran@...rochip.com, hverkuil+cisco@...nel.org,
laurent.pinchart+renesas@...asonboard.com,
linux-staging@...ts.linux.dev, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] staging: most: video: fix potential race in list
iteration
On Thu, Feb 05, 2026 at 11:16:20AM +0900, Minu Jin wrote:
> There is a pattern in the loops where the lock is dropped
> to call a specific function and then re-acquired.
>
> The list can be exposed during this short gap, creating a potential
> race condition. This patch fixes the problem by replacing the list
> head with a local free list using list_replace_init(), instead of
> using the lock/unlock pattern in the loop.
>
> Signed-off-by: Minu Jin <s9430939@...er.com>
> ---
> Changes in v2:
> - Use list_replace_init() instead of moving one-by-one.
> (suggested by Dan Carpenter)
Thanks.
Reviewed-by: Dan Carpenter <dan.carpenter@...aro.org>
regards,
dan carpenter
Powered by blists - more mailing lists