usb: f_fs: Prevent race & use after free scenario on epfile
In case of fast composition switch along with disconnect/connect performed, there are chances that the process of ep_disable, function_disable, epfile_release & ep0_release race between each other causing use after free scenarios. This is seen with epfile struct itself and also with the read_buffer member variable as well. This change is a squash of below commits. (1c3b63b8d818) usb: f_fs: Avoid use-after-free of epfile. (971a85773340) usb: f_fs: Fix use-after-free for epfile. (a008a43c5cd8) usb: f_fs: Prevent race between ep0_release & reset_work. (f7fbba49e4a8) usb: f_fs: Fix Double free from ffs_data_clear. Change-Id: If3f69e1e25be810aa82931b65fa2506b2e9f33bd Signed-off-by:Pratham Pratap <prathampratap@codeaurora.org> Signed-off-by:
Udipto Goswami <quic_ugoswami@quicinc.com>
Loading
Please register or sign in to comment