Re: [PATCH V7 02/16] rv: Add runtime reactors interface
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- Subject: Re: [PATCH V7 02/16] rv: Add runtime reactors interface
- From: Daniel Bristot de Oliveira <bristot@xxxxxxxxxx>
- Date: Tue, 26 Jul 2022 22:06:51 +0200
- Cc: Wim Van Sebroeck <wim@xxxxxxxxxxxxxxxxxx>, Guenter Roeck <linux@xxxxxxxxxxxx>, Jonathan Corbet <corbet@xxxxxxx>, Ingo Molnar <mingo@xxxxxxxxxx>, Thomas Gleixner <tglx@xxxxxxxxxxxxx>, Peter Zijlstra <peterz@xxxxxxxxxxxxx>, Will Deacon <will@xxxxxxxxxx>, Catalin Marinas <catalin.marinas@xxxxxxx>, Marco Elver <elver@xxxxxxxxxx>, Dmitry Vyukov <dvyukov@xxxxxxxxxx>, "Paul E. McKenney" <paulmck@xxxxxxxxxx>, Shuah Khan <skhan@xxxxxxxxxxxxxxxxxxx>, Gabriele Paoloni <gpaoloni@xxxxxxxxxx>, Juri Lelli <juri.lelli@xxxxxxxxxx>, Clark Williams <williams@xxxxxxxxxx>, Tao Zhou <tao.zhou@xxxxxxxxx>, Randy Dunlap <rdunlap@xxxxxxxxxxxxx>, linux-doc@xxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx, linux-trace-devel@xxxxxxxxxxxxxxx
- In-reply-to: <20220726122629.2a99cb6e@gandalf.local.home>
- References: <cover.1658778484.git.bristot@kernel.org> <516e8767f20f47b185b7dc0dceb1f1d3abb36dce.1658778484.git.bristot@kernel.org> <20220726122629.2a99cb6e@gandalf.local.home>
- User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0
On 7/26/22 18:26, Steven Rostedt wrote:
> On Mon, 25 Jul 2022 22:11:14 +0200
> Daniel Bristot de Oliveira <bristot@xxxxxxxxxx> 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
[Index of Archives]
[Linux USB Development]
[Linux USB Development]
[Linux Audio Users]
[Yosemite Hiking]
[Linux Kernel]
[Linux SCSI]