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]
Message-ID: <2cf5a45c-35ed-fe78-1e2b-18e93706b75e@cumulusnetworks.com>
Date:   Fri, 6 Jan 2017 08:05:57 -0700
From:   David Ahern <dsa@...ulusnetworks.com>
To:     Sergei Shtylyov <sergei.shtylyov@...entembedded.com>,
        netdev@...r.kernel.org, stephen@...workplumber.org
Subject: Re: [PATCH iproute2 2/3] ip vrf: Improve cgroup2 error messages

>> @@ -80,13 +80,21 @@ char *find_cgroup2_mount(void)
>>
>>      if (mount("none", mnt, CGROUP2_FS_NAME, 0, NULL)) {
>>          /* EBUSY means already mounted */
>> -        if (errno != EBUSY) {
>> +        if (errno == EBUSY)
>> +            goto out;
>> +
>> +        if (errno == ENODEV) {
>>              fprintf(stderr,
>>                  "Failed to mount cgroup2. Are CGROUPS enabled in your kernel?\n");
>> -            free(mnt);
>> -            return NULL;
>> +        } else {
>> +            fprintf(stderr,
>> +                "Failed to mount cgroup2: %s\n",
>> +                strerror(errno));
>>          }
> 
>    How about a *switch* instead?

I did consider it. Did not make the code simpler or easier to read.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ