# \[PATCH 0/2\] Use \_\_scm\_install\_fd() more widely

- From: Kees Cook \<hidden\>
- Date: 2020-06-10 04:52:51 
- List: netdev
- Page: https://ratatoskr.run/netdev/2020/06/5995224
- Thread: https://ratatoskr.run/netdev/2020/06/5995224/t.md

```text
Hi,

This extends the recent work hch did for scm_detach_fds(), and updates
the compat path as well, fixing bugs in the process. Additionally,
an effectively incomplete and open-coded __scm_install_fd() is fixed
in pidfd_getfd().

Thanks!

-Kees

Kees Cook (2):
  net/scm: Regularize compat handling of scm_detach_fds()
  pidfd: Replace open-coded partial __scm_install_fd()

 include/net/scm.h |  1 +
 kernel/pid.c      | 12 ++---------
 net/compat.c      | 55 +++++++++++++++++++++--------------------------
 net/core/scm.c    | 43 +++++++++++++++++++++++-------------
 4 files changed, 56 insertions(+), 55 deletions(-)

-- 
2.25.1

```
