mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-24 10:34:43 +03:00
String parameter to kstrtouint has to be null terminated. If the input string to gk20a_power_write doesn't have the terminating null character then gk20a_power_write passed string without appending null character to kstrtouint. Fix this by preparing string to occupy null character in the end after user supplied string characters. Bug 3388725 Change-Id: I521f879326908e296dd9a32b5781db490d40bdd2 Signed-off-by: Sagar Kamble <skamble@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2603985 Reviewed-by: Debarshi Dutta <ddutta@nvidia.com> Reviewed-by: Konsta Holtta <kholtta@nvidia.com> Reviewed-by: Martin Radev <mradev@nvidia.com> Reviewed-by: Vijayakumar Subbu <vsubbu@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com> GVS: Gerrit_Virtual_Submit