Re: [PATCH V6 01/16] rv: Add Runtime Verification (RV) interface

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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?

-- Steve

> +
> +	return simple_read_from_buffer(user_buf, count, ppos, buff, strlen(buff) + 1);
> +}
> +



[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux