All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michal Nazarewicz <mina86@mina86.com>
To: Benoit Goby <benoit@android.com>,
	linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: Felipe Balbi <balbi@ti.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Benoit Goby <benoit@android.com>
Subject: Re: [PATCH] usb: gadget: FunctionFS: Fix missing braces in parse_opts
Date: Wed, 09 Jan 2013 09:08:56 +0100	[thread overview]
Message-ID: <xa1tr4lu93s7.fsf@mina86.com> (raw)
In-Reply-To: <1357703829-26621-1-git-send-email-benoit@android.com>

[-- Attachment #1: Type: text/plain, Size: 1603 bytes --]

On Wed, Jan 09 2013, Benoit Goby <benoit@android.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@android.com>

Acked-by: Michal Nazarewicz <mina86@mina86.com>
Cc: stable@kernel.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@google.com>--------------ooO--(_)--Ooo--

[-- Attachment #2.1: Type: text/plain, Size: 0 bytes --]



[-- Attachment #2.2: Type: application/pgp-signature, Size: 835 bytes --]

  reply	other threads:[~2013-01-09  8:09 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-09  3:57 [PATCH] usb: gadget: FunctionFS: Fix missing braces in parse_opts Benoit Goby
2013-01-09  8:08 ` Michal Nazarewicz [this message]
2013-01-09  9:17 ` [PATCH 1/2] usb: gadget: FunctionFS: Use kstrtoul() Michal Nazarewicz
2013-01-09  9:17   ` [PATCH 2/2] usb: gadget: FunctionFS: Refactor option parsing Michal Nazarewicz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xa1tr4lu93s7.fsf@mina86.com \
    --to=mina86@mina86.com \
    --cc=balbi@ti.com \
    --cc=benoit@android.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.