Xie, Regarding the patches: 1. The replaced code in fourth patch is checked to be a copy-paste of the `sys_close` syscall. 2. It is not uncommon for the applications to close FD making it allocated for a different file. In our particular case the file is closed in the *source* process and *added* to a target process, so matching fds should not be the problem. 3. There is an implementation of the exact same thing in the SCM_RIGHTS [1] that can be used as the reference code.
[1] https://github.com/torvalds/linux/blob/master/net/core/scm.c#L248 Pavel On Fri, Jul 10, 2015 at 5:27 PM, Xie, Huawei <huawei.xie at intel.com> wrote: > On 6/17/2015 11:24 PM, Thomas Monjalon wrote: > > 2015-05-07 06:54, Xie, Huawei: > >> On 4/16/2015 7:48 PM, Pavel Boldin wrote: > >>> + /* Closing the source_fd */ > >>> + ret = sys_close(eventfd_copy.source_fd); > >> Pavel: > >> Here we close the fd and re-install a new file on this fd later. > >> sys_close does all cleanup. > >> But, for instance, if we allocate new fd later, normally it will reuse > >> the just freed fds by sys_close, is there issue here? > > Pavel, Huawei, > > Could we come to a conclusion on this patch series please? > For the previous 3 patches, i am OK except that i don't think inline is > needed explicitly for non-performance critical function. > For this patch, didn't check the fs code. > > > > > > >