Merge "diag: Protect shared resources while mask updates" into msm-3.0