[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <80ae9017-7a2d-bde6-318a-08cfd40e428d@gmail.com>
Date: Sun, 5 Jul 2020 09:15:45 -0600
From: David Ahern <dsahern@...il.com>
To: Dmitry Yakunin <zeil@...dex-team.ru>, netdev@...r.kernel.org,
Stephen Hemminger <stephen@...workplumber.org>
Subject: Re: [PATCH iproute2-next] lib: fix checking of returned file handle
size for cgroup
On 6/25/20 5:46 AM, Dmitry Yakunin wrote:
> Before this patch check is happened only in case when we try to find
> cgroup at cgroup2 mount point.
>
needs to go to main branch with
Fixes: d5e6ee0dac64 ("ss: introduce cgroup2 cache and helper functions")
> Signed-off-by: Dmitry Yakunin <zeil@...dex-team.ru>
> ---
> lib/fs.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/lib/fs.c b/lib/fs.c
> index e265fc0..4b90a70 100644
> --- a/lib/fs.c
> +++ b/lib/fs.c
> @@ -148,10 +148,10 @@ __u64 get_cgroup2_id(const char *path)
> strerror(errno));
> goto out;
> }
> - if (fhp->handle_bytes != sizeof(__u64)) {
> - fprintf(stderr, "Invalid size of cgroup2 ID\n");
> - goto out;
> - }
> + }
> + if (fhp->handle_bytes != sizeof(__u64)) {
> + fprintf(stderr, "Invalid size of cgroup2 ID\n");
> + goto out;
> }
>
> memcpy(cg_id.bytes, fhp->f_handle, sizeof(__u64));
>
Powered by blists - more mailing lists