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: <8735oyuz0v.fsf@disp2133>
Date:   Mon, 18 Oct 2021 10:35:12 -0500
From:   ebiederm@...ssion.com (Eric W. Biederman)
To:     Yu Zhao <yuzhao@...gle.com>
Cc:     Alexey Gladkov <legion@...nel.org>,
        Rune Kleveland <rune.kleveland@...omedia.dk>,
        Jordan Glover <Golden_Miller83@...tonmail.ch>,
        LKML <linux-kernel@...r.kernel.org>,
        Linux-MM <linux-mm@...ck.org>,
        "containers\@lists.linux-foundation.org" 
        <containers@...ts.linux-foundation.org>
Subject: Re: [CFT][PATCH] ucounts: Fix signal ucount refcounting

Yu Zhao <yuzhao@...gle.com> writes:

> On Sat, Oct 16, 2021 at 11:35 AM Eric W. Biederman
> <ebiederm@...ssion.com> wrote:
>>
>> Alexey Gladkov <legion@...nel.org> writes:
>>
>> > On Fri, Oct 15, 2021 at 05:10:58PM -0500, Eric W. Biederman wrote:
>> >> +                    goto dec_unwind;
>> >> +    }
>> >> +    return ret;
>> >> +dec_unwind:
>> >> +    dec = atomic_long_add_return(1, &iter->ucount[type]);
>> >
>> > Should be -1 ?
>>
>> Yes it should.  I will fix and resend.
>
> Or just atomic_long_dec_return().

It would have to be atomic_long_sub_return().

Even then I would want to change all of kernel/ucount.c to use
the same helper function so discrepancies can easily be spotted.

It is a good idea, just not I think for this particular patch.

Eric

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ