So from rrs feedback on D3115, some uses of callout_stop_safe() do want the return value of 0 when we prevented the migration, while other cases, in particular, sleepq use, require it to report that the callout was running. I do not see any other way around than to allow caller to explicitely request the desired behaviour (assuming the statement of the tcp code wanting the return (0) is true).
The patch below does just that, and from cognet@ testing, it solves the issue for sleepqueue.