提交 f1356172 编写于 作者: L Lukasz Majewski 提交者: Felipe Balbi

usb: gadget: rndis: fix Missing req->context assignment

It is crucial to assign each req->context value to struct rndis.

The problem happens for multi function gadget (g_multi) when multiple
functions are calling common usb_composite_dev control request.

It might happen that *_setup method from one usb function will
alter some fields of this common request issued by other USB
function.
Signed-off-by: NLukasz Majewski <l.majewski@samsung.com>
Signed-off-by: NKyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: NFelipe Balbi <balbi@ti.com>
上级 ad579699
......@@ -500,6 +500,7 @@ rndis_setup(struct usb_function *f, const struct usb_ctrlrequest *ctrl)
if (buf) {
memcpy(req->buf, buf, n);
req->complete = rndis_response_complete;
req->context = rndis;
rndis_free_response(rndis->config, buf);
value = n;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册