Re: [PATCH V6 01/16] rv: Add Runtime Verification (RV) interface
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- Subject: Re: [PATCH V6 01/16] rv: Add Runtime Verification (RV) interface
- From: Daniel Bristot de Oliveira <bristot@xxxxxxxxxx>
- Date: Wed, 20 Jul 2022 17:20:14 +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: <20220720104718.59148968@gandalf.local.home>
- References: <cover.1658244826.git.bristot@kernel.org> <69bb4c369b4f6f12014eb9ca3c28b74e4378c007.1658244826.git.bristot@kernel.org> <20220720104718.59148968@gandalf.local.home>
- User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0
On 7/20/22 16:47, Steven Rostedt wrote:
> On Tue, 19 Jul 2022 19:27:06 +0200
> Daniel Bristot de Oliveira <bristot@xxxxxxxxxx> wrote:
>
>> +/*
>> + * Interface to read the enable/disable status of a monitor.
>> + */
>> +static ssize_t monitor_desc_read_data(struct file *filp, char __user *user_buf, size_t count,
>> + loff_t *ppos)
>> +{
>> + struct rv_monitor_def *mdef = filp->private_data;
>> + char buff[256];
>> +
>> + memset(buff, 0, sizeof(buff));
>> +
>> + mutex_lock(&rv_interface_lock);
>> + snprintf(buff, sizeof(buff), "%s\n", mdef->monitor->description);
>> + mutex_unlock(&rv_interface_lock);
>
> What exactly is the mutex protecting here?
I placed it around all access on read/write in the interface,
but indeed, it is not needed here (static data). It is in a file inside
the monitor's directory... so the directory is there, and the
module is there as well.
-- Daniel
[Index of Archives]
[Linux USB Development]
[Linux USB Development]
[Linux Audio Users]
[Yosemite Hiking]
[Linux Kernel]
[Linux SCSI]