USB: f_fs: Avoid using completion variable on stack
done completion variable is local stack variable to ffs_epfile_io(). It is being used to unblock ffs_epfile_io() from USB request completion context where done is accessed through req->context. If ffs_epfile_io() is unblocked or interrupted due to epfile close or any signal before USB request completion is handled, req->context is having stale "done" reference causing invalid access. Fix this issue by storing done completion reference with epfile structure instead of having it on stack to have valid req->context in completion handler. CRs-Fixed: 653761 Change-Id: I15102538d1b5bee14dfa3c7b3fa1f8e3f767cf71 Signed-off-by:Sujeet Kumar <ksujeet@codeaurora.org> Signed-off-by:
Mayank Rana <mrana@codeaurora.org>
Loading
Please register or sign in to comment