Re: [PATCH] fork: fix pid refcount leaks when destroying file

2020-07-26 Thread Christian Brauner
On Sun, Jul 26, 2020 at 12:49:59PM +0800, Xin Xiong wrote: > When clone_flags & CLONE_PIDFD is true,the function creates a new file > object called pidfile,and invokes get_pid(),which increases the refcnt > of pid for pidfile to hold. > > The reference counting issues take place in the error

[PATCH] fork: fix pid refcount leaks when destroying file

2020-07-25 Thread Xin Xiong
When clone_flags & CLONE_PIDFD is true,the function creates a new file object called pidfile,and invokes get_pid(),which increases the refcnt of pid for pidfile to hold. The reference counting issues take place in the error handling paths. When error occurs after the construction of pidfile, the