proc: first_tid() fix/cleanup
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v2 Latest4 patches 9 repliesIn review
- v13 patches 9 repliesSuperseded
Patches in v2 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/4 | proc: first_tid: fix the potential use-after-freefs/ | +3 | 0 replies | |
| 2/4 | proc: change first_tid() to use while_each_thread()fs/ | +10 | 0 replies | |
| 3/4 | proc: simplify proc_task_readdir/first_tid pathsfs/ | +22 | 1 reply | |
| 4/4 | proc: avoid ->f_pos overflows in proc_task_readdir() pathsfs/ | +10 | 7 replies |
Reviews trailers per patch
3 of 4 patches have a Reviewed-by or Acked-by.
| Patch | Eric W. Biederman |
|---|---|
| 1/4 | R-b |
| 2/4 | R-b |
| 3/4 | R-b |
| 4/4 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v2 0/4] proc: first_tid() fix/cleanup
Hello.
next_thread() should be avoided, probably next_tid() is the only "valid" user.
But now we have another reason to avoid (and probably even kill) it, we are going to replace or fix while_each_thread(), almost every lockless usage is wrong.
Changes:
1/4: Update the changelog, do not move the comment.
2/4: No changes.
3/4: Update the comment following the explanations from
Eric.
Eric pointed that get_proc_task() without rcu lock can trigger the (bogus) warning. Extract the similar check from pid_delete_dentry() into the new helper and use it instead.
I didn't dare to preserve his ack, but the only change is the new proc_inode_is_dead() helper and
- if (pid_task(proc_pid(inode))
+ if (proc_inode_is_dead(inode))
in proc_task_readdir().
4/4: New.
Oleg.