Re: [PATCH v16 09/10] unwind deferred: Use SRCU unwind_deferred_task_work()

From: Josh Poimboeuf

Date: Fri Sep 19 2025 - 20:31:18 EST


On Tue, Jul 29, 2025 at 02:23:13PM -0400, Steven Rostedt wrote:
> @@ -230,6 +232,14 @@ int unwind_deferred_request(struct unwind_work *work, u64 *cookie)
> if (WARN_ON_ONCE(!CAN_USE_IN_NMI && in_nmi()))
> return -EINVAL;
>
> + /* Do not allow cancelled works to request again */
> + bit = READ_ONCE(work->bit);
> + if (WARN_ON_ONCE(bit < 0))
> + return -EINVAL;

The local 'bit' variable is unsigned long, so this will never be < 0.

Should be "bit == -1"?

--
Josh