Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider: - [Medium] The `sdt_might_sleep_end()` macro is bypassed when `___wait_var_event` is interrupted, leaving the DEPT tracker in an inconsistent state. - [Medium] The `sdt_might_sleep_end()` macro is bypassed when `___wait_event` is interrupted, leaving the DEPT tracker in an inconsistent state. --
commit 0bd2d42866fa6b852ee5317edcaf6890a90c3c65 Author: Byungchul Park <[email protected]> dept: apply sdt_might_sleep_{start,end}() to hashed-waitqueue wait Make dept able to track dependencies by hashed-waitqueue waits. > diff --git a/include/linux/wait_bit.h b/include/linux/wait_bit.h > index 9e29d79fc790a..179a616ad245a 100644 > --- a/include/linux/wait_bit.h > +++ b/include/linux/wait_bit.h [ ... ] > @@ -257,6 +258,7 @@ extern wait_queue_head_t *__var_waitqueue(void *p); > struct wait_bit_queue_entry __wbq_entry; \ > long __ret = ret; /* explicit shadow */ \ > \ > + sdt_might_sleep_start(NULL); \ > init_wait_var_entry(&__wbq_entry, var, \ > exclusive ? WQ_FLAG_EXCLUSIVE : 0); \ > for (;;) { \ > @@ -274,6 +276,7 @@ extern wait_queue_head_t *__var_waitqueue(void *p); > cmd; \ > } \ > finish_wait(__wq_head, &__wbq_entry.wq_entry); \ > + sdt_might_sleep_end(); \ > __out: __ret; > \ > }) [Severity: Medium] If this wait is interrupted by a signal, the loop executes a goto __out which bypasses sdt_might_sleep_end(). Does this leave the dept tracker in an inconsistent state where the task's stage remains permanently armed? This could cause false positive dependency tracking splats on subsequent waits, or fail to record new dependencies because the tracker is blinded by the stale stage. I noticed the exact same issue is present in ___wait_event(): include/linux/wait.h:___wait_event() { ... if (___wait_is_interruptible(state) && __int) { __ret = __int; goto __out; } ... sdt_might_sleep_end(); __out: __ret; }) [Severity: Medium] Does ___wait_event() also skip sdt_might_sleep_end() when interrupted? By missing the paired cleanup call, the task's stage could remain permanently armed here as well. Would it make sense to move the __out label above sdt_might_sleep_end(), or otherwise ensure the state is cleaned up on the interrupted paths for both of these macros? -- Sashiko AI review ยท https://sashiko.dev/#/patchset/[email protected]?part=13

