summaryrefslogtreecommitdiff
path: root/drivers/gpu/msm
diff options
context:
space:
mode:
authorDeepak Kumar <dkumar@codeaurora.org>2017-02-23 17:49:37 +0530
committerDeepak Kumar <dkumar@codeaurora.org>2017-02-24 12:06:16 +0530
commite5f964228dc62f6dfed96db010340c6f32008af7 (patch)
tree47618e6ec4c489953f52c9f5f839a1c986fe9882 /drivers/gpu/msm
parentd72462d943ee499ac17a485bdacca60c0db31c04 (diff)
msm: kgsl: Use init_utsname() instead of ustname() for kernel build info.
Using per uts namespace utsname() for kernel build information section in snapshot dump was causing a kernel panic because it is accessing a NULL nsproxy pointer. nsproxy was null because corresponding user task got SIGKILL which triggered call to free_nsproxy. The patch fixes the issue by using the global init_utsname() which is always valid. Change-Id: I13b1b07557794a7fcedf0c9e6acfd3406fbb8989 Signed-off-by: Deepak Kumar <dkumar@codeaurora.org>
Diffstat (limited to 'drivers/gpu/msm')
-rw-r--r--drivers/gpu/msm/kgsl_snapshot.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/gpu/msm/kgsl_snapshot.c b/drivers/gpu/msm/kgsl_snapshot.c
index 1caa673db6ff..7de43dd27ffe 100644
--- a/drivers/gpu/msm/kgsl_snapshot.c
+++ b/drivers/gpu/msm/kgsl_snapshot.c
@@ -1,4 +1,4 @@
-/* Copyright (c) 2012-2016, The Linux Foundation. All rights reserved.
+/* Copyright (c) 2012-2017, The Linux Foundation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
@@ -156,8 +156,10 @@ static size_t snapshot_os(struct kgsl_device *device,
header->osid = KGSL_SNAPSHOT_OS_LINUX_V3;
/* Get the kernel build information */
- strlcpy(header->release, utsname()->release, sizeof(header->release));
- strlcpy(header->version, utsname()->version, sizeof(header->version));
+ strlcpy(header->release, init_utsname()->release,
+ sizeof(header->release));
+ strlcpy(header->version, init_utsname()->version,
+ sizeof(header->version));
/* Get the Unix time for the timestamp */
header->seconds = get_seconds();