[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20201102113648.GB9840@duo.ucw.cz>
Date: Mon, 2 Nov 2020 12:36:48 +0100
From: Pavel Machek <pavel@...x.de>
To: Guenter Roeck <linux@...ck-us.net>
Cc: Salvatore Bonaccorso <carnil@...ian.org>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
linux-kernel@...r.kernel.org, torvalds@...ux-foundation.org,
akpm@...ux-foundation.org, shuah@...nel.org, patches@...nelci.org,
lkft-triage@...ts.linaro.org, pavel@...x.de, stable@...r.kernel.org
Subject: Re: [PATCH 4.19 000/264] 4.19.153-rc1 review
Hi!
> >>> perf failures are as usual. powerpc:
> >
> > Regarding the perf failures, do you plan to revert b801d568c7d8 ("perf
> > cs-etm: Move definition of 'traceid_list' global variable from header
> > file") included in 4.19.152 or is a bugfix underway?
> >
>
> The problem is:
>
> In file included from util/evlist.h:15:0,
> from util/evsel.c:30:
> util/evsel.c: In function ‘perf_evsel__exit’:
> util/util.h:25:28: error: passing argument 1 of ‘free’ discards ‘const’ qualifier from pointer target type
> /usr/include/stdlib.h:563:13: note: expected ‘void *’ but argument is of type ‘const char *’
> extern void free (void *__ptr) __THROW;
>
> This is seen with older versions of gcc (6.5.0 in my case). I have no idea why
> newer versions of gcc/glibc accept this (afaics free() still expects a char *,
> not a const char *). The underlying problem is that pmu_name should not be
> declared const char *, but char *, since it is allocated. The upstream version
> of perf no longer uses the same definition of zfree(). It was changed from
> #define zfree(ptr) ({ free(*ptr); *ptr = NULL; })
> to
> #define zfree(ptr) __zfree((void **)(ptr))
> which does the necessary typecast. The fix would be to either change the definition
> of zfree to add the typecast, or to change the definition of pmu_name to drop the const.
> Both would only apply to v4.19.y. I don't know if either would be acceptable.
As the problem is already fixed in the mainline, either solution
should be acceptable for -stable.
Probably the one adjusting the zfree() is more suitable, as that is
the way it was solved in the mainline.
Best regards,
Pavel
--
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Download attachment "signature.asc" of type "application/pgp-signature" (196 bytes)
Powered by blists - more mailing lists