diff options
author | David S. Miller <davem@davemloft.net> | 2016-06-30 05:03:36 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-06-30 05:03:36 -0400 |
commit | ee58b57100ca953da7320c285315a95db2f7053d (patch) | |
tree | 77b815a31240adc4d6326346908137fc6c2c3a96 /tools/perf/util/symbol.c | |
parent | 6f30e8b022c8e3a722928ddb1a2ae0be852fcc0e (diff) | |
parent | e7bdea7750eb2a64aea4a08fa5c0a31719c8155d (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Several cases of overlapping changes, except the packet scheduler
conflicts which deal with the addition of the free list parameter
to qdisc_enqueue().
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'tools/perf/util/symbol.c')
-rw-r--r-- | tools/perf/util/symbol.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/tools/perf/util/symbol.c b/tools/perf/util/symbol.c index 20f9cb32b703..54c4ff2b1cee 100644 --- a/tools/perf/util/symbol.c +++ b/tools/perf/util/symbol.c | |||
@@ -1933,17 +1933,17 @@ int setup_intlist(struct intlist **list, const char *list_str, | |||
1933 | static bool symbol__read_kptr_restrict(void) | 1933 | static bool symbol__read_kptr_restrict(void) |
1934 | { | 1934 | { |
1935 | bool value = false; | 1935 | bool value = false; |
1936 | FILE *fp = fopen("/proc/sys/kernel/kptr_restrict", "r"); | ||
1936 | 1937 | ||
1937 | if (geteuid() != 0) { | 1938 | if (fp != NULL) { |
1938 | FILE *fp = fopen("/proc/sys/kernel/kptr_restrict", "r"); | 1939 | char line[8]; |
1939 | if (fp != NULL) { | ||
1940 | char line[8]; | ||
1941 | 1940 | ||
1942 | if (fgets(line, sizeof(line), fp) != NULL) | 1941 | if (fgets(line, sizeof(line), fp) != NULL) |
1943 | value = atoi(line) != 0; | 1942 | value = (geteuid() != 0) ? |
1943 | (atoi(line) != 0) : | ||
1944 | (atoi(line) == 2); | ||
1944 | 1945 | ||
1945 | fclose(fp); | 1946 | fclose(fp); |
1946 | } | ||
1947 | } | 1947 | } |
1948 | 1948 | ||
1949 | return value; | 1949 | return value; |