From: tip-bot for Xiao Guangrong <xiaoguangrong@cn.fujitsu.com>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, paulus@samba.org, hpa@zytor.com,
mingo@redhat.com, lizf@cn.fujitsu.com, peterz@infradead.org,
xiaoguangrong@cn.fujitsu.com, fweisbec@gmail.com,
hirofumi@mail.parknet.co.jp, tglx@linutronix.de, mingo@elte.hu
Subject: [tip:perf/urgent] perf_event: Fix __dsos__write_buildid_table()
Date: Mon, 7 Dec 2009 05:31:18 GMT [thread overview]
Message-ID: <tip-d9541ed3241bb6c2b805d3ea0e87563cf2a0c5c3@git.kernel.org> (raw)
In-Reply-To: <4B1C7F73.80707@cn.fujitsu.com>
Commit-ID: d9541ed3241bb6c2b805d3ea0e87563cf2a0c5c3
Gitweb: http://git.kernel.org/tip/d9541ed3241bb6c2b805d3ea0e87563cf2a0c5c3
Author: Xiao Guangrong <xiaoguangrong@cn.fujitsu.com>
AuthorDate: Mon, 7 Dec 2009 12:07:15 +0800
Committer: Ingo Molnar <mingo@elte.hu>
CommitDate: Mon, 7 Dec 2009 06:26:24 +0100
perf_event: Fix __dsos__write_buildid_table()
The remain buff size is 'len - pos->long_name_len - 1', not
'len - pos->long_name_len + 1'
This bug was introduced by commit 7691b1e ("perf tools: Misc small
fixes").
Signed-off-by: Xiao Guangrong <xiaoguangrong@cn.fujitsu.com>
Acked-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Li Zefan <lizf@cn.fujitsu.com>
LKML-Reference: <4B1C7F73.80707@cn.fujitsu.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
| 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
--git a/tools/perf/util/header.c b/tools/perf/util/header.c
index 08b6759..59a9c0b 100644
--- a/tools/perf/util/header.c
+++ b/tools/perf/util/header.c
@@ -209,7 +209,7 @@ static int __dsos__write_buildid_table(struct list_head *head, int fd)
err = do_write(fd, pos->long_name, pos->long_name_len + 1);
if (err < 0)
return err;
- err = do_write(fd, zero_buf, len - pos->long_name_len + 1);
+ err = do_write(fd, zero_buf, len - pos->long_name_len - 1);
if (err < 0)
return err;
}
next prev parent reply other threads:[~2009-12-07 5:31 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-07 4:04 [PATCH 1/3] perf/sched: fix 'perf sched trace' Xiao Guangrong
2009-12-07 4:06 ` [PATCH 2/3] perf_event: fix for procing raw event Xiao Guangrong
2009-12-07 4:07 ` [PATCH 3/3] perf_event: fix __dsos__write_buildid_table() Xiao Guangrong
2009-12-07 5:19 ` OGAWA Hirofumi
2009-12-07 5:31 ` tip-bot for Xiao Guangrong [this message]
2009-12-07 4:54 ` [PATCH 2/3] perf_event: fix for procing raw event Xiao Guangrong
2009-12-07 5:04 ` [PATCH] perf_event: fix for processing raw event - fix Xiao Guangrong
2009-12-07 5:31 ` [tip:perf/urgent] perf_event: Eliminate raw->size tip-bot for Xiao Guangrong
2009-12-07 8:13 ` Peter Zijlstra
2009-12-07 8:30 ` Xiao Guangrong
2009-12-07 8:46 ` OGAWA Hirofumi
2009-12-07 6:33 ` [PATCH] perf_event: fix for processing raw event - fix OGAWA Hirofumi
2009-12-07 6:35 ` OGAWA Hirofumi
2009-12-07 5:31 ` [tip:perf/urgent] perf_event: Fix raw event processing tip-bot for Xiao Guangrong
2009-12-07 5:30 ` [tip:perf/urgent] perf/sched: Fix 'perf sched trace' tip-bot for Xiao Guangrong
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=tip-d9541ed3241bb6c2b805d3ea0e87563cf2a0c5c3@git.kernel.org \
--to=xiaoguangrong@cn.fujitsu.com \
--cc=fweisbec@gmail.com \
--cc=hirofumi@mail.parknet.co.jp \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=lizf@cn.fujitsu.com \
--cc=mingo@elte.hu \
--cc=mingo@redhat.com \
--cc=paulus@samba.org \
--cc=peterz@infradead.org \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox