On 01/19/2017 11:55 AM, Krzysztof Opasiak wrote:
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: sta...@vger.kernel.org
Signed-off-by: Krzysztof Opasiak <k.opas...@samsung.com>
---

This series fixes a crash I was experiencing in the v4.9.4 kernel caused by "usb: gadget: f_hid: use alloc_ep_req()"[1]. Thank you!

[1]: http://lkml.iu.edu/hypermail/linux/kernel/1701.0/00575.html

Tested-by: David Lechner <da...@lechnology.com>

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to