You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Stop the allproc walk from following a dangling pointer
proc_find_by_pid and proc_find_by_name walk allproc with no lock held and no
reference taken on what they return. When a process exits mid-walk the next
p_forw is freed memory, and dereferencing it panics the kernel - which is why
touching a long-lived process like SceShellCore is fine while touching an app
that is starting and stopping takes the console down.
The lock cannot be taken from here, so this does not remove the race. It does
stop the walk from running off into unmapped memory: each link is checked for
a plausible kernel address before it is dereferenced, and the walk is bounded
so a corrupted list terminates instead of running forever.
Callers should still avoid hammering these paths.