[CRIU] [PATCH] sk-netlink: typo fix for unconnected netlink sockets
Pavel Emelyanov
xemul at parallels.com
Fri Mar 29 12:05:32 EDT 2013
On 03/29/2013 07:52 PM, Andrey Vagin wrote:
> The netlink_diag doesn't provide any info about non-connected and
> non-bound sockets.
What if we for any reason found an fd, that points to netlink socket,
that was not collected? Will lookup_socket() return ERR or NULL?
> Signed-off-by: Andrey Vagin <avagin at openvz.org>
> ---
> sk-netlink.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/sk-netlink.c b/sk-netlink.c
> index b06808b..dbfe8ca 100644
> --- a/sk-netlink.c
> +++ b/sk-netlink.c
> @@ -91,7 +91,7 @@ static int dump_one_netlink_fd(int lfd, u32 id, const struct fd_parms *p)
> SkOptsEntry skopts = SK_OPTS_ENTRY__INIT;
>
> sk = (struct netlink_sk_desc *)lookup_socket(p->stat.st_ino, PF_NETLINK, 0);
> - if (IS_ERR_OR_NULL(sk))
> + if (IS_ERR(sk))
> goto err;
>
> ne.id = id;
>
More information about the CRIU
mailing list