Re: [PATCH 2/3] net/scm: cleanup scm_detach_fds

Ido Schimmel
2020-05-13T10:31:48Z

On Wed, May 13, 2020 at 12:17:51PM +0200, Christoph Hellwig wrote:
> On Wed, May 13, 2020 at 12:10:37PM +0200, Christoph Hellwig wrote:
> > Ok. I'll see what went wrong for real and will hopefully have a
> > different patch for you in a bit.
>
> Can you try this patch instead of the previous one?

Works. Thanks a lot!

>
> diff --git a/net/core/scm.c b/net/core/scm.c
> index a75cd637a71ff..875df1c2989db 100644
> --- a/net/core/scm.c
> +++ b/net/core/scm.c
> @@ -307,7 +307,7 @@ static int __scm_install_fd(struct file *file, int __user *ufd, int o_flags)
> sock_update_classid(&sock->sk->sk_cgrp_data);
> }
> fd_install(new_fd, get_file(file));
> - return error;
> + return 0;
> }
>
> static int scm_max_fds(struct msghdr *msg)