aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/scripts/python
diff options
context:
space:
mode:
authorPeter Zijlstra <peterz@infradead.org>2017-10-04 11:13:37 +0200
committerIngo Molnar <mingo@kernel.org>2017-10-10 10:04:28 +0200
commit8b405d5c5d0996d3d16f70c42744a0500f5b6ec3 (patch)
tree3cac3b08d64fc4cda870579eaef748f955ec2c08 /tools/perf/scripts/python
parentMerge branch 'ppc-bundle' (bundle from Michael Ellerman) (diff)
downloadlinux-8b405d5c5d0996d3d16f70c42744a0500f5b6ec3.tar.gz
linux-8b405d5c5d0996d3d16f70c42744a0500f5b6ec3.zip
locking/lockdep: Fix stacktrace mess
There is some complication between check_prevs_add() and check_prev_add() wrt. saving stack traces. The problem is that we want to be frugal with saving stack traces, since it consumes static resources. We'll only know in check_prev_add() if we need the trace, but we can call into it multiple times. So we want to do on-demand and re-use. A further complication is that check_prev_add() can drop graph_lock and mess with our static resources. In any case, the current state; after commit: ce07a9415f26 ("locking/lockdep: Make check_prev_add() able to handle external stack_trace") is that we'll assume the trace contains valid data once check_prev_add() returns '2'. However, as noted by Josh, this is false, check_prev_add() can return '2' before having saved a trace, this then result in the possibility of using uninitialized data. Testing, as reported by Wu, shows a NULL deref. So simplify. Since the graph_lock() thing is a debug path that hasn't really been used in a long while, take it out back and avoid the head-ache. Further initialize the stack_trace to a known 'empty' state; as long as nr_entries == 0, nothing should deref entries. We can then use the 'entries == NULL' test for a valid trace / on-demand saving. Analyzed-by: Josh Poimboeuf <jpoimboe@redhat.com> Reported-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Cc: Byungchul Park <byungchul.park@lge.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Fixes: ce07a9415f26 ("locking/lockdep: Make check_prev_add() able to handle external stack_trace") Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions
> 2007-11-20autoconf: Add tests for memmem, strtoumax and mkdtemp functionsJakub Narebski2-0/+21 2007-11-20gitweb: Put project README in div.readme, fix its paddingJakub Narebski2-1/+7 2007-11-20gitweb: Style all tables using CSSJakub Narebski2-15/+11 2007-11-20send-email: Don't add To: recipients to the Cc: headerAsk Bjørn Hansen1-1/+5 2007-11-20Doc fix for git-reflog: mention @{...} syntax, and <ref> in synopsys.Matthieu Moy1-4/+11 2007-11-20config: clarify compression defaultsBrian Downing1-1/+5 2007-11-20config: correct core.loosecompression documentationBrian Downing1-1/+1 2007-11-19gitview: import only one of gtksourceview and gtksourceview2Anton Gyllenberg1-10/+7 2007-11-19git-send-email: show all headers when sending mailDavid D. Kilzer2-2/+39 2007-11-19Further clarify clean.requireForce changesWincent Colaiuta1-2/+3 2007-11-18Documentation: Fix references to deprecated commandsJ. Bruce Fields2-8/+3 2007-11-18Update draft release notes for 1.5.4Junio C Hamano1-1/+12 2007-11-18user-manual: mention "..." in "Generating diffs", etc.J. Bruce Fields1-4/+11 2007-11-18Draft release notes: fix clean.requireForce descriptionJunio C Hamano1-4/+4 2007-11-18user-manual: Add section "Why bisecting merge commits can be harder ..."Steffen Prohaska1-0/+66 2007-11-18GIT 1.5.3.6v1.5.3.6Junio C Hamano2-10/+6 2007-11-18Use compat mkdtemp() on Solaris boxesGuido Ostkamp1-2/+1 2007-11-17grep -An -Bm: fix invocation of external grep commandJunio C Hamano1-3/+3 2007-11-17git-remote.txt: fix example urlJ. Bruce Fields1-1/+1 2007-11-17git-svn: Fix a typo and add a comma in an error message in git-svnDavid Reiss1-1/+1 2007-11-17git-svn log: handle unreachable revisions like "svn log"David D Kilzer2-19/+110 2007-11-17git-svn log: include commit log for the smallest revision in a rangeDavid D Kilzer2-7/+7 2007-11-17git-svn log: fix ascending revision rangesDavid D Kilzer2-1/+15 2007-11-17git-svn's dcommit must use subversion's configKonstantin V. Arkhipov1-0/+3