čt 10. 10. 2024 v 22:06 odesílatel Steven Rostedt <[email protected]> napsal: > > If nr_states is zero, this returns 0 without ever allocating > saved_cpu_idle_disable_state. > >> ... > > This returns -1 even if nr_states is zero. That is, > save_cpu_idle_disable_state() can return success, but this restore will > return failure. > > -- Steve
Oh I see: there might be no idle states to save, saved_cpu_idle_disable_state doesn't get allocated at all, and then restore_cpu_idle_disable_state behaves as the saves weren't saved before. Checking for nr_state should fix that; I'll send a v3. Tomas
