lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 17 Mar 2014 16:04:04 -0700
From:	Greg KH <gregkh@...uxfoundation.org>
To:	Robert Baldyga <r.baldyga@...sung.com>
Cc:	balbi@...com, linux-usb@...r.kernel.org,
	linux-kernel@...r.kernel.org, mina86@...a86.com,
	m.szyprowski@...sung.com, andrzej.p@...sung.com
Subject: Re: [PATCH] usb: gadget: f_fs: add missing spinlock and mutex unlock

On Mon, Mar 10, 2014 at 09:33:37AM +0100, Robert Baldyga wrote:
> This patch adds missing spin_unlock and mutex_unlock calls in
> error handling code.
> 
> Signed-off-by: Robert Baldyga <r.baldyga@...sung.com>
> Acked-by: Michal Nazarewicz <mina86@...a86.com>
> Acked-by: Felipe Balbi <balbi@...com>
> ---
>  drivers/usb/gadget/f_fs.c |    8 ++++++--
>  1 file changed, 6 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/usb/gadget/f_fs.c b/drivers/usb/gadget/f_fs.c
> index b7d273a..d6bd0a3 100644
> --- a/drivers/usb/gadget/f_fs.c
> +++ b/drivers/usb/gadget/f_fs.c
> @@ -802,7 +802,7 @@ static ssize_t ffs_epfile_io(struct file *file, struct ffs_io_data *io_data)
>  		if (io_data->aio) {
>  			req = usb_ep_alloc_request(ep->ep, GFP_KERNEL);
>  			if (unlikely(!req))
> -				goto error;
> +				goto error_lock;
>  
>  			req->buf      = data;
>  			req->length   = io_data->len;
> @@ -817,7 +817,7 @@ static ssize_t ffs_epfile_io(struct file *file, struct ffs_io_data *io_data)
>  			ret = usb_ep_queue(ep->ep, req, GFP_ATOMIC);
>  			if (unlikely(ret)) {
>  				usb_ep_free_request(ep->ep, req);
> -				goto error;
> +				goto error_lock;
>  			}
>  			ret = -EIOCBQUEUED;
>  
> @@ -863,6 +863,10 @@ static ssize_t ffs_epfile_io(struct file *file, struct ffs_io_data *io_data)
>  
>  	mutex_unlock(&epfile->mutex);
>  	return ret;
> +
> +error_lock:
> +	spin_unlock_irq(&epfile->ffs->eps_lock);
> +	mutex_unlock(&epfile->mutex);
>  error:
>  	kfree(data);
>  	return ret;
> -- 
> 1.7.9.5

This patch doesn't apply to my tree at all :(
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ