lkml.org 
[lkml]   [2017]   [Oct]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v6 13/14] platform/x86: wmi: create character devices when requested by drivers
On Mon, Oct 09, 2017 at 05:51:51PM -0500, Mario Limonciello wrote:
> +static long wmi_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
> +{
> + struct wmi_driver *wdriver = NULL;
> + struct wmi_block *wblock = NULL;
> + const char *driver_name;
> + struct list_head *p;
> + int ret;
> +
> + if (_IOC_TYPE(cmd) != WMI_IOC)
> + return -ENOTTY;
> +
> + driver_name = filp->f_path.dentry->d_iname;
> +
> + list_for_each(p, &wmi_block_list) {

No locking while walking the list, you are brave :(

\
 
 \ /
  Last update: 2017-10-10 13:04    [W:0.259 / U:0.128 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site