Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1322513
| From | Tong Zhang <ztong@vt.edu> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 1/1] broken perf tool on 4.4-rc1 |
| Date | 2016-01-30 22:20 +0100 |
| Message-ID | <qWL62-1jr-3@gated-at.bofh.it> (permalink) |
| Organization | linux.* mail to news gateway |
reproduce:
lzto@objd ~ $ ~/linux/tools/perf/perf record -I -e intel_pt/tsc=1,noretcomp=1/u /bin/ls
lzto@objd ~ $ ~/linux/tools/perf/perf script -F event,comm,pid,tid,time,addr,ip,sym,dso,iregs
Segmentation fault
lzto@objd ~ $
Upon further investigation, it seems that
commit 747a9b0a08ae ("Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip")
breaks perf tool.
__list_del(): tools/include/linux/list.h does not check null pointer dereference
Signed-off-by: Tong Zhang <ztong@vt.edu>
---
tools/include/linux/list.h | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/tools/include/linux/list.h b/tools/include/linux/list.h
index 1da4238..1d644a0 100644
--- a/tools/include/linux/list.h
+++ b/tools/include/linux/list.h
@@ -85,8 +85,10 @@ static inline void list_add_tail(struct list_head *new, struct list_head *head)
*/
static inline void __list_del(struct list_head * prev, struct list_head * next)
{
- next->prev = prev;
- WRITE_ONCE(prev->next, next);
+ if (next)
+ next->prev = prev;
+ if (prev)
+ WRITE_ONCE(prev->next, next);
}
/**
--
2.4.10
Back to linux.kernel | Previous | Next | Find similar | Unroll thread
[PATCH 1/1] broken perf tool on 4.4-rc1 Tong Zhang <ztong@vt.edu> - 2016-01-30 22:20 +0100
csiph-web