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]
Message-ID: <xa1tr4lu93s7.fsf@mina86.com>
Date:	Wed, 09 Jan 2013 09:08:56 +0100
From:	Michal Nazarewicz <mina86@...a86.com>
To:	Benoit Goby <benoit@...roid.com>, linux-usb@...r.kernel.org,
	linux-kernel@...r.kernel.org
Cc:	Felipe Balbi <balbi@...com>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	Benoit Goby <benoit@...roid.com>
Subject: Re: [PATCH] usb: gadget: FunctionFS: Fix missing braces in parse_opts

On Wed, Jan 09 2013, Benoit Goby <benoit@...roid.com> wrote:
> Add missing braces around an if block in ffs_fs_parse_opts. This broke
> parsing the uid/gid mount options and causes mount to fail when using
> uid/gid. This has been introduced by commit b9b73f7c (userns: Convert usb
> functionfs to use kuid/kgid where appropriate) in 3.7.
>
> Signed-off-by: Benoit Goby <benoit@...roid.com>

Acked-by: Michal Nazarewicz <mina86@...a86.com>
Cc: stable@...nel.org

> ---
>  drivers/usb/gadget/f_fs.c |    6 +++---
>  1 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/usb/gadget/f_fs.c b/drivers/usb/gadget/f_fs.c
> index 4a6961c..8c2f251 100644
> --- a/drivers/usb/gadget/f_fs.c
> +++ b/drivers/usb/gadget/f_fs.c
> @@ -1153,15 +1153,15 @@ static int ffs_fs_parse_opts(struct ffs_sb_fill_data *data, char *opts)
>  					pr_err("%s: unmapped value: %lu\n", opts, value);
>  					return -EINVAL;
>  				}
> -			}
> -			else if (!memcmp(opts, "gid", 3))
> +			} else if (!memcmp(opts, "gid", 3)) {
>  				data->perms.gid = make_kgid(current_user_ns(), value);
>  				if (!gid_valid(data->perms.gid)) {
>  					pr_err("%s: unmapped value: %lu\n", opts, value);
>  					return -EINVAL;
>  				}
> -			else
> +			} else {
>  				goto invalid;
> +			}
>  			break;
>  
>  		default:

-- 
Best regards,                                         _     _
.o. | Liege of Serenely Enlightened Majesty of      o' \,=./ `o
..o | Computer Science,  Michał “mina86” Nazarewicz    (o o)
ooo +----<email/xmpp: mpn@...gle.com>--------------ooO--(_)--Ooo--

Content of type "application/pgp-signature" skipped

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ