SoC: msm: Add Buffer overflow check

The overflow check is required to ensure that user space data
in kernel may not go beyond buffer boundary.

CRs-Fixed: 563086
Signed-off-by: Asish Bhattacharya <asishb@codeaurora.org>
Signed-off-by: Mohammad Johny Shaik <mjshai@codeaurora.org>
(cherry picked from commit 7e09949355b2dac9aac8bb414037ccaca3c68d86)
Signed-off-by: Pavan Chikkala <pavanc@codeaurora.org>

Change-Id: I4da774740c71b97dc2e4fd16c78bf065ad457690
Signed-off-by: Pavan Chikkala <pavanc@codeaurora.org>