Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1292115
| From | Jiri Olsa <jolsa@redhat.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v5 02/14] perf tools: Prevent calling machine__delete() on non-allocated machine |
| Date | 2015-12-15 13:40 +0100 |
| Message-ID | <qFX3A-479-21@gated-at.bofh.it> (permalink) |
| References | <qFyRz-4Xv-7@gated-at.bofh.it> <qFyRA-4Xv-17@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Mon, Dec 14, 2015 at 10:39:11AM +0000, Wang Nan wrote:
SNIP
> @@ -137,12 +138,15 @@ void machine__exit(struct machine *machine)
> void machine__delete(struct machine *machine)
> {
> machine__exit(machine);
> - free(machine);
> + if (machine->allocated)
> + free(machine);
> + else
> + pr_warning("WARNING: delete a non-allocated machine. Skip.\n");
we used WARN_ONCE several times already in similar cases
jirka
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH v5 02/14] perf tools: Prevent calling machine__delete() on non-allocated machine Wang Nan <wangnan0@huawei.com> - 2015-12-14 11:50 +0100
Re: [PATCH v5 02/14] perf tools: Prevent calling machine__delete() on non-allocated machine Jiri Olsa <jolsa@redhat.com> - 2015-12-15 13:40 +0100
Re: [PATCH v5 02/14] perf tools: Prevent calling machine__delete() on non-allocated machine "Wangnan (F)" <wangnan0@huawei.com> - 2015-12-16 02:40 +0100
Re: [PATCH v5 02/14] perf tools: Prevent calling machine__delete() on non-allocated machine Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-12-16 20:50 +0100
csiph-web