* [PATCH iproute2-next] lib: fix checking of returned file handle size for cgroup
@ 2020-06-25 11:46 Dmitry Yakunin
2020-07-05 15:15 ` David Ahern
0 siblings, 1 reply; 2+ messages in thread
From: Dmitry Yakunin @ 2020-06-25 11:46 UTC (permalink / raw)
To: dsahern, netdev
Before this patch check is happened only in case when we try to find
cgroup at cgroup2 mount point.
Signed-off-by: Dmitry Yakunin <zeil@yandex-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));
--
2.7.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH iproute2-next] lib: fix checking of returned file handle size for cgroup
2020-06-25 11:46 [PATCH iproute2-next] lib: fix checking of returned file handle size for cgroup Dmitry Yakunin
@ 2020-07-05 15:15 ` David Ahern
0 siblings, 0 replies; 2+ messages in thread
From: David Ahern @ 2020-07-05 15:15 UTC (permalink / raw)
To: Dmitry Yakunin, netdev, Stephen Hemminger
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@yandex-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));
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-07-05 15:15 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-25 11:46 [PATCH iproute2-next] lib: fix checking of returned file handle size for cgroup Dmitry Yakunin
2020-07-05 15:15 ` David Ahern
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.