diag: Prevent out of bound access while initializing msg mask
Move the mask_info mutex initialization outside mask structure
to facilitate prevention of out of bound access while initializing
msg mask during md session creation. Use separate msg_mask_tbl_count
for ODL session msg mask and regular msg mask to prevent out of
bound access in a possible race condition of accessing mask ranges.
The chances of accessing uninitialized mask is prevented
by adding null pointer checks for the mask structure and its
member pointer.
Change-Id: I87497c67daff8cc1797a1266d50456bdbd3a9c23
Signed-off-by:
Manoj Prabhu B <bmanoj@codeaurora.org>
Loading
Please register or sign in to comment