stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Felipe Balbi <balbi@kernel.org>
To: Krzysztof Opasiak <kopasiak90@gmail.com>
Cc: gregkh@linuxfoundation.org, k.opasiak@samsung.com,
	eu@felipetonello.com, zonque@gmail.com, david@lechnology.com,
	linux-usb@vger.kernel.org, stable@vger.kernel.org
Subject: Re: [PATCH 4/4] usb: gadget: f_hid: fix: Move IN request allocation to set_alt()
Date: Mon, 23 Jan 2017 13:33:43 +0200	[thread overview]
Message-ID: <874m0q80yw.fsf@linux.intel.com> (raw)
In-Reply-To: <1484848530-13040-4-git-send-email-k.opasiak@samsung.com>

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

Krzysztof Opasiak <kopasiak90@gmail.com> writes:

> Since commit ba1582f22231 ("usb: gadget: f_hid: use alloc_ep_req()")
> we cannot allocate any requests in bind() as we check if we should
> align request buffer based on endpoint descriptor which is assigned
> in set_alt().
>
> Allocating request in bind() function causes a NULL pointer
> dereference.
>
> This commit moves allocation of IN request from bind() to set_alt()
> to prevent this issue.
>
> Fixes: ba1582f22231 ("usb: gadget: f_hid: use alloc_ep_req()")
> Cc: stable@vger.kernel.org
> Signed-off-by: Krzysztof Opasiak <k.opasiak@samsung.com>

please rebase on testing/next:

checking file drivers/usb/gadget/function/f_hid.c
Hunk #1 succeeded at 338 (offset 54 lines).
Hunk #2 succeeded at 348 (offset 54 lines).
Hunk #3 succeeded at 363 (offset 54 lines).
Hunk #4 succeeded at 376 (offset 54 lines).
Hunk #5 succeeded at 611 (offset 54 lines).
Hunk #6 succeeded at 648 (offset 54 lines).
Hunk #7 FAILED at 611.
Hunk #8 succeeded at 686 (offset 54 lines).
Hunk #9 succeeded at 765 (offset 54 lines).
Hunk #10 succeeded at 802 (offset 65 lines).
Hunk #11 succeeded at 1068 (offset 65 lines).
1 out of 11 hunks FAILED

previous 3 patches applied fine, though.

-- 
balbi

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

  parent reply	other threads:[~2017-01-23 11:33 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-19 17:55 [PATCH 1/4] usb: gadget: f_hid: fix: Free out requests Krzysztof Opasiak
2017-01-19 17:55 ` [PATCH 2/4] usb: gadget: f_hid: fix: Prevent accessing released memory Krzysztof Opasiak
2017-01-19 17:55 ` [PATCH 3/4] usb: gadget: f_hid: Use spinlock instead of mutex Krzysztof Opasiak
2017-01-19 17:55 ` [PATCH 4/4] usb: gadget: f_hid: fix: Move IN request allocation to set_alt() Krzysztof Opasiak
2017-01-20 20:28   ` David Lechner
2017-01-23 11:33   ` Felipe Balbi [this message]
2017-01-24  2:27     ` [PATCH v2] " Krzysztof Opasiak

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=874m0q80yw.fsf@linux.intel.com \
    --to=balbi@kernel.org \
    --cc=david@lechnology.com \
    --cc=eu@felipetonello.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=k.opasiak@samsung.com \
    --cc=kopasiak90@gmail.com \
    --cc=linux-usb@vger.kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=zonque@gmail.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;
as well as URLs for NNTP newsgroup(s).