public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Michal Nazarewicz <mina86@mina86.com>
To: Robert Baldyga <r.baldyga@samsung.com>, balbi@ti.com
Cc: gregkh@linuxfoundation.org, linux-usb@vger.kernel.org,
	linux-kernel@vger.kernel.org, b.zolnierkie@samsung.com,
	m.szyprowski@samsung.com, andrzej.p@samsung.com,
	Robert Baldyga <r.baldyga@samsung.com>
Subject: Re: [PATCH v2] USB: gadget: f_fs: fix error handling
Date: Mon, 30 Sep 2013 13:50:25 +0200	[thread overview]
Message-ID: <xa1teh868r5q.fsf@mina86.com> (raw)
In-Reply-To: <1380534101-23956-1-git-send-email-r.baldyga@samsung.com>

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

On Mon, Sep 30 2013, Robert Baldyga wrote:
> Hello,
>
> This is update for my patch fixing error handling in functionfs module.
> I have fixed typos from previous version, and changed description for greater
> clearity as Sergei Shtylyov suggested.
>
> This patch add missing error check in ffs_func_bind() function, after
> ffs_do_descs() function call for high speed descriptors. Without this check
> it's possible that the module will try to dereference incorrect pointer.
>
> Signed-off-by: Robert Baldyga <r.baldyga@samsung.com>

Acked-by: Michal Nazarewicz <mina86@mina86.com>

> Changelog:
>
> v2:
> - fix typos
> - expand patch desctiprion
>
> v1: https://lkml.org/lkml/2013/9/27/128
> ---

Note that it's helpful for maintainers to include everything that is not
meant to go in the commit message after those three minus signs.  This
way, “git am” will ignore the text.

>  drivers/usb/gadget/f_fs.c |    2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/drivers/usb/gadget/f_fs.c b/drivers/usb/gadget/f_fs.c
> index 1a66c5b..0da66ba 100644
> --- a/drivers/usb/gadget/f_fs.c
> +++ b/drivers/usb/gadget/f_fs.c
> @@ -2264,6 +2264,8 @@ static int ffs_func_bind(struct usb_configuration *c,
>  				   data->raw_descs + ret,
>  				   (sizeof data->raw_descs) - ret,
>  				   __ffs_func_bind_do_descs, func);
> +		if (unlikely(ret < 0))
> +			goto error;
>  	}
>  
>  	/*
> -- 
> 1.7.9.5
>

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

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



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

  reply	other threads:[~2013-09-30 11:50 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-30  9:41 [PATCH v2] USB: gadget: f_fs: fix error handling Robert Baldyga
2013-09-30 11:50 ` Michal Nazarewicz [this message]
2013-10-01 13:58   ` Felipe Balbi

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=xa1teh868r5q.fsf@mina86.com \
    --to=mina86@mina86.com \
    --cc=andrzej.p@samsung.com \
    --cc=b.zolnierkie@samsung.com \
    --cc=balbi@ti.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=m.szyprowski@samsung.com \
    --cc=r.baldyga@samsung.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox