OSDN Git Service

diag: Protect md_info structure while reallocation
authorManoj Prabhu B <bmanoj@codeaurora.org>
Wed, 25 Jul 2018 09:30:19 +0000 (15:00 +0530)
committerGerrit - the friendly Code Review server <code-review@localhost>
Wed, 1 Aug 2018 06:12:42 +0000 (23:12 -0700)
commit013254162adc53b12866a9300fdf0a1f0bdb9a0e
tree157895bb99fb3980eb4062aa45cb8266cb224815
parent414b079b7f4ba955f4679cd87be64199b4e875c7
diag: Protect md_info structure while reallocation

The possibility of md_info structure being accessed simultaneously
by two threads is prevented by synchronizing while buffer
reallocation for hdlc encoding. Extend the scope of protection to
md_info till queueing the write to sdcard.

CRs-Fixed: 2279473
Change-Id: I75ddb102adfc6c79f35ed69914c9140cb82894c9
Signed-off-by: Manoj Prabhu B <bmanoj@codeaurora.org>
drivers/char/diag/diag_memorydevice.c
drivers/char/diag/diagfwd_peripheral.c