aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorJack Pham <jackp@codeaurora.org>2014-02-18 22:16:19 -0800
committerMoyster <oysterized@gmail.com>2018-05-16 15:11:46 +0200
commit0a9f997a3d3536c7750c6ec8c4023c53fda4f2fa (patch)
treeacd8718c42a9c8e2b286b22d7c0fe6fe48488e4c /include
parentbb4b357ef392e4ce1f862d1e0d23ad4be982b74b (diff)
usb: gadget: android: Save/restore ep0 completion function
The android_setup() function currently gives the f_accessory setup function first opportunity to handle control requests in order to support Android Open Accessory (AOA) hosts. That function makes use of cdev->req and overrides its completion function, but not in all cases. Thus, if a later request uses the same request pointer but doesn't (re)set req->complete it could result in the wrong completion function being called and causing invalid memory access. One way to fix this would be to explicitly set req->complete in all cases but that might require auditing all function drivers that have ep0 handling. Instead, note that the composite device had already initially set cdev->req->complete and simply cache and restore that pointer at the start of android_setup(). Change-Id: I33bcd17bd20687a349d537d1013b52a2afef6996 Signed-off-by: Jack Pham <jackp@codeaurora.org>
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions