OSDN Git Service

msm: ipa3: Add mutex to prevent race condition
authorMohammed Javid <mjavid@codeaurora.org>
Fri, 8 Jun 2018 11:25:32 +0000 (16:55 +0530)
committerGerrit - the friendly Code Review server <code-review@localhost>
Wed, 29 Aug 2018 06:10:45 +0000 (23:10 -0700)
commita78a593c7e9e26a6ecd4919b52eb849cc0eb19dd
tree45cc11e68e3c2d33dfc28f9728aa426e82419d3c
parent89cb3f2fc113e4886a506d28f2adc7ac8e0c6e3f
msm: ipa3: Add mutex to prevent race condition

There is a race condition between ipa3_nat_init_cmd
and ipa_read_nat4. The two thread will R/W the critical
global variables. This will result in race conditions
and possibly buffer overread/ overwrite issues. Add code
to prevent this race condition.

Change-Id: I6bf9a837ae941cf3ad9413da6e44821916acf196
Acked-by: Pooja Kumari <kumarip@qti.qualcomm.com>
Signed-off-by: Mohammed Javid <mjavid@codeaurora.org>
drivers/platform/msm/ipa/ipa_v2/ipa_nat.c
drivers/platform/msm/ipa/ipa_v3/ipa_nat.c