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: <0d286c66-2fb7-f91c-8d77-936a311b77de@kernel.org>
Date:   Tue, 26 Jul 2022 22:06:51 +0200
From:   Daniel Bristot de Oliveira <bristot@...nel.org>
To:     Steven Rostedt <rostedt@...dmis.org>
Cc:     Wim Van Sebroeck <wim@...ux-watchdog.org>,
        Guenter Roeck <linux@...ck-us.net>,
        Jonathan Corbet <corbet@....net>,
        Ingo Molnar <mingo@...hat.com>,
        Thomas Gleixner <tglx@...utronix.de>,
        Peter Zijlstra <peterz@...radead.org>,
        Will Deacon <will@...nel.org>,
        Catalin Marinas <catalin.marinas@....com>,
        Marco Elver <elver@...gle.com>,
        Dmitry Vyukov <dvyukov@...gle.com>,
        "Paul E. McKenney" <paulmck@...nel.org>,
        Shuah Khan <skhan@...uxfoundation.org>,
        Gabriele Paoloni <gpaoloni@...hat.com>,
        Juri Lelli <juri.lelli@...hat.com>,
        Clark Williams <williams@...hat.com>,
        Tao Zhou <tao.zhou@...ux.dev>,
        Randy Dunlap <rdunlap@...radead.org>,
        linux-doc@...r.kernel.org, linux-kernel@...r.kernel.org,
        linux-trace-devel@...r.kernel.org
Subject: Re: [PATCH V7 02/16] rv: Add runtime reactors interface

On 7/26/22 18:26, Steven Rostedt wrote:
> On Mon, 25 Jul 2022 22:11:14 +0200
> Daniel Bristot de Oliveira <bristot@...nel.org> wrote:
> 
>> +/**
>> + * reactor_cleanup_monitor - cleanup a monitor reference
>> + * @mdef:       monitor's definition.
>> + */
>> +void reactor_cleanup_monitor(struct rv_monitor_def *mdef)
>> +{
>> +	mdef->rdef->counter--;
>> +}
>> +
> 
> Doesn't this require a lock? Also you might want to add a WARN_ONCE() if it
> goes below zero.

reactor_populate_monitor() and reactor_cleanup_monitor() should be called with
lock taken... adding lockdep check.

oops, I was not actually calling it yet. Not a BUG, as we do not unload reactors,
it was BUG on the way to happen :-)

Adding a WARN_ONCE().

-- Daniel

> 
> -- Steve

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ