[Devel] [PATCH rh7 0/2] unix: Show number of scm files in fdinfo

Kirill Tkhai ktkhai at virtuozzo.com
Thu Dec 26 16:23:42 MSK 2019


[ms]

This patchset expands the information whether a socket
contains scmd fds or not:

$cat /proc/[pid]/fdinfo/[unix_sk_fd] | grep scm_fds
scm_fds: 1

This sometimes will be useful to check who owns a counter
to a resource and prevents it destruction. Say, someone
opens ploop and places its fd into a unix socket.

---

Kirill Tkhai (2):
      net: Allow to show socket-specific information in /proc/[pid]/fdinfo/[fd]
      unix: Show number of pending scm files of receive queue in fdinfo


 include/linux/net.h   |    1 +
 include/net/af_unix.h |    5 +++++
 net/socket.c          |   13 ++++++++++++
 net/unix/af_unix.c    |   54 +++++++++++++++++++++++++++++++++++++++++++++----
 4 files changed, 69 insertions(+), 4 deletions(-)

--
Signed-off-by: Kirill Tkhai <ktkhai at virtuozzo.com>



More information about the Devel mailing list