Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1322513 > unrolled thread
| Started by | Tong Zhang <ztong@vt.edu> |
|---|---|
| First post | 2016-01-30 22:20 +0100 |
| Last post | 2016-01-30 22:20 +0100 |
| Articles | 1 — 1 participant |
Back to article view | Back to linux.kernel
[PATCH 1/1] broken perf tool on 4.4-rc1 Tong Zhang <ztong@vt.edu> - 2016-01-30 22:20 +0100
| From | Tong Zhang <ztong@vt.edu> |
|---|---|
| Date | 2016-01-30 22:20 +0100 |
| Subject | [PATCH 1/1] broken perf tool on 4.4-rc1 |
| Message-ID | <qWL62-1jr-3@gated-at.bofh.it> |
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 top | Article view | linux.kernel
csiph-web