lkml.org 
[lkml]   [2021]   [Apr]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] fs: split receive_fd_replace from __receive_fd
On Thu, Mar 25, 2021 at 09:22:09AM +0100, Christoph Hellwig wrote:
> receive_fd_replace shares almost no code with the general case, so split
> it out. Also remove the "Bump the sock usage counts" comment from
> both copies, as that is now what __receive_sock actually does.
>
> Signed-off-by: Christoph Hellwig <hch@lst.de>

I'm okay with repeating code in fs/file.c. What I wanted to avoid was
open coded combinations in various callers.

So, sure, this can be split, but as-is the patch breaks SECCOMP_IOCTL_NOTIF_ADDFD:
https://lore.kernel.org/linux-fsdevel/20210329071939.GC3633@xsang-OptiPlex-9020/

-Kees

--
Kees Cook

\
 
 \ /
  Last update: 2021-04-02 21:01    [W:0.256 / U:0.200 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site