summaryrefslogtreecommitdiff
path: root/fs/jbd2/commit.c
diff options
context:
space:
mode:
authorGirish Mahadevan <girishm@codeaurora.org>2016-04-15 15:08:07 -0600
committerMukesh Kumar Savaliya <msavaliy@codeaurora.org>2016-07-12 19:41:59 +0530
commitb663776b59caf5b9ed14693fec01fa9a47a907b7 (patch)
treef4664b616ed29a4000217dd6674e93cda1f0a9c2 /fs/jbd2/commit.c
parent400520a6e2f06cc7c45e386e769a85d4aded565b (diff)
msm_serial_hs: Add defensive checks due to sudden port close
In certain scenarios, it is possible for a close to be called on the tty port while the rx thread is still processing. In certain scenarios a race between the 2 threads could lead to unexpected results such as making BAM API calls after the pipes are disconnected or the thread accessing the framework structures after they're freed. Add defensive checks to: - Check the state of the rx pipes and tty before running the rx work thread. - When closing the port, flush the rx work thread and wait till there are no pending buffers before forcing a close. Currently the shutdown waits on the flush state of the rx pipe to be in SHUTDOWN , but this only happens after the rx thread runs, kicks the runtime pm which puts it in the SHUTDOWN state. But since the port close calls the runtime pm suspend callback, just wait on the thread to finish the buffer. Change-Id: Ibf56e1aeb0c6811fec36f7618933d74c367ed305 Signed-off-by: Girish Mahadevan <girishm@codeaurora.org> Signed-off-by: Mukesh Kumar Savaliya <msavaliy@codeaurora.org>
Diffstat (limited to 'fs/jbd2/commit.c')
0 files changed, 0 insertions, 0 deletions