lkml.org 
[lkml]   [2017]   [Jan]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 7/7] misc: intel-ish-client: add intel ishtp clients driver
On Fri, 23 Dec 2016, Even Xu wrote:

[ ... snip ... ]
> +static ssize_t ishtp_cl_write(struct file *file, const char __user *ubuf,
> + size_t length, loff_t *offset)
> +{
> + struct ishtp_cl_miscdev *ishtp_cl_misc = file->private_data;
> + struct ishtp_cl *cl;
> + void *write_buf;
> + struct ishtp_device *dev;
> + int ret;
> +
> + /* Non-blocking semantics are not supported */
> + if (file->f_flags & O_NONBLOCK) {
> + ret = -EINVAL;
> + goto out_unlock;

When taking the error path here you'd try to unlock
ishtp_cl_misc->cl_mutex before actually acquiring it.

--
Jiri Kosina
SUSE Labs

\
 
 \ /
  Last update: 2017-01-03 10:54    [W:0.238 / U:0.476 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site