Skip to contentSkip to conversation

unwind: Fix signedness bug in unwind_deferred_request()

PATCH New Dan Carpenter 1 participant 1 message Nov 19, 2025

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 unwind: Fix signedness bug in unwind_deferred_request()

The "bit" value comes from "work->bit". It is set to -1 if we cancel the work in unwind_deferred_cancel(). It needs to be signed because we check for negative values. Change the type from unsigned long to int.

Fixes 357eda2d7450 ("unwind deferred: Use SRCU unwind_deferred_task_work()")

---
v2: fix style issue

 kernel/unwind/deferred.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/unwind/deferred.c +1 -1
index a88fb481c4a3..3dda585963d5 100644
@@ -232,7 +232,7 @@ int unwind_deferred_request(struct unwind_work *work, u64 *cookie)
 	struct unwind_task_info *info = &current->unwind_info;
 	int twa_mode = TWA_RESUME;
 	unsigned long old, bits;
-	unsigned long bit;
+	int bit;
 	int ret;
 
 	*cookie = 0;
Signature · 1 line
2.51.0