mbox series

[v2,0/2] pipe07: close /proc/self/fd after counting fds

Message ID 20231002173416.1080347-1-edliaw@google.com
Headers show
Series pipe07: close /proc/self/fd after counting fds | expand

Message

Edward Liaw Oct. 2, 2023, 5:34 p.m. UTC
Leaving the directory fd open will count against the max number of fds
opened, so the final expected count will be off when (max_fds -
record_open_fds()) is even.

v1->v2:
Split patch into bugfix and refactor
Fix bug in refactor that caused exp_num_pipes to not round down to
nearest even integer

Edward Liaw (2):
  pipe07: close /proc/self/fd after counting fds
  pipe07: refactor exp_num_pipes

 testcases/kernel/syscalls/pipe/pipe07.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

--
2.42.0.582.g8ccd20d70d-goog