usb: adb reboot and then adb disconnect [1/1]
authorhe.he <he.he@amlogic.com>
Mon, 22 Oct 2018 07:47:00 +0000 (15:47 +0800)
committerJianxin Pan <jianxin.pan@amlogic.com>
Tue, 30 Oct 2018 07:14:17 +0000 (00:14 -0700)
commitc6f40e4f73ad9bdbe178bbb542e1bfc2c13a78a3
tree53f68f4c23e6a09c32ed6ac43b4469c31c244539
parent5d782cb05790798da1d5ab923084ca7390720367
usb: adb reboot and then adb disconnect [1/1]

PD#174155

Problem:
complete_ep 0xffffffc05bed2858, ep->queue empty!
1. After adb process be killed, data buffer is freed and
this memory is allocated for the other. But the address
is hold by the controller.
2. Adbd in PC is running. So, the controller receive the
data and write to this memory.
3.The value of this memory is modified by the controller.
This could cause the memory problem.

Solution:
whenever io_data->aio equals 1, the data buffer is from a fixed array.

Verify:
Test: adb devices, adb shell, exit, adb push
in android8(p212) and android9(w400)
verified by he he

Change-Id: Idac755d3646639e2944a82f42abf9adb9aeaea8c
Signed-off-by: he.he <he.he@amlogic.com>
drivers/usb/gadget/function/f_fs.c
drivers/usb/gadget/function/u_fs.h