aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSubash Abhinov Kasiviswanathan <subashab@codeaurora.org>2014-08-21 12:58:23 -0600
committerLinux Build Service Account <lnxbuild@localhost>2014-11-04 08:54:20 -0700
commit03dadbe66e8536b5682c1e20d327ea29556450d0 (patch)
treef5c28a11f79406f1fbc5a8a6e168e2268611018d
parentfad3bcc2422f5fabc3296d96ed49ac6993ebf372 (diff)
downloadandroid_external_iproute2-staging/cm-12.0-caf.tar.gz
android_external_iproute2-staging/cm-12.0-caf.tar.bz2
android_external_iproute2-staging/cm-12.0-caf.zip
iproute2: lib: fix crash seen while running tc q_htb with rate specifiedstaging/cm-12.0-caf
While running tc q_htb with rate specified, a crash is seen. signal 11 (SIGSEGV), code 2 (SEGV_ACCERR) The exact location of the crash is get_hz() where the extern int is assigned the value from the function __get_hz(). The current suspicion is that the issue could be because of the declaration of the variable util.h and for some reason the definition in util.c is not being read. Explictly assigning a value to this variable seems to be allocating the memory and no crash is seen. CRs-fixed: 665103 Change-Id: Ia6c1d7f33978f7831b662109eb211fe771c59a14
-rw-r--r--lib/utils.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/utils.c b/lib/utils.c
index 1ad7616..dfb0368 100644
--- a/lib/utils.c
+++ b/lib/utils.c
@@ -481,7 +481,7 @@ int inet_addr_match(const inet_prefix *a, const inet_prefix *b, int bits)
return 0;
}
-int __iproute2_hz_internal;
+int __iproute2_hz_internal = 0;
int __get_hz(void)
{