lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 8 Oct 2020 18:17:36 +0000
From:   Donald Sharp <sharpd@...dia.com>
To:     Dmitry Yakunin <zeil@...dex-team.ru>,
        "dsahern@...il.com" <dsahern@...il.com>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>
Subject: Re: [PATCH iproute2] lib: ignore invalid mounts in cg_init_map

I've tested this patch and it works for me.

donald

On 10/8/20, 2:00 PM, "Dmitry Yakunin" <zeil@...dex-team.ru> wrote:

    External email: Use caution opening links or attachments


    In case of bad entries in /proc/mounts just skip cgroup cache initialization.
    Cgroups in output will be shown as "unreachable:cgroup_id".

    Fixes: d5e6ee0dac64 ("ss: introduce cgroup2 cache and helper functions")
    Signed-off-by: Dmitry Yakunin <zeil@...dex-team.ru>
    Reported-by: Donald Sharp <sharpd@...dia.com>
    ---
     lib/cg_map.c | 5 ++---
     1 file changed, 2 insertions(+), 3 deletions(-)

    diff --git a/lib/cg_map.c b/lib/cg_map.c
    index 77f030e..39f244d 100644
    --- a/lib/cg_map.c
    +++ b/lib/cg_map.c
    @@ -96,11 +96,10 @@ static void cg_init_map(void)

            mnt = find_cgroup2_mount(false);
            if (!mnt)
    -               exit(1);
    +               return;

            mntlen = strlen(mnt);
    -       if (nftw(mnt, nftw_fn, 1024, FTW_MOUNT) < 0)
    -               exit(1);
    +       (void) nftw(mnt, nftw_fn, 1024, FTW_MOUNT);

            free(mnt);
     }
    --
    2.7.4


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ