[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <87mto7il4b.fsf@ashishki-desk.ger.corp.intel.com>
Date: Mon, 20 Sep 2021 13:42:28 +0300
From: Alexander Shishkin <alexander.shishkin@...ux.intel.com>
To: cgel.zte@...il.com, peterz@...radead.org
Cc: mingo@...hat.com, acme@...nel.org, mark.rutland@....com,
jolsa@...hat.com, namhyung@...nel.org, tglx@...utronix.de,
bp@...en8.de, x86@...nel.org, hpa@...or.com,
linux-perf-users@...r.kernel.org, linux-kernel@...r.kernel.org,
Yang Guang <yang.guang5@....com.cn>,
alexander.shishkin@...ux.intel.com
Subject: Re: [PATCH] Add pointer check
cgel.zte@...il.com writes:
> From: Yang Guang <yang.guang5@....com.cn>
>
> The buf->stop_te pointer may be NULL.
[...]
> --- a/arch/x86/events/intel/pt.c
> +++ b/arch/x86/events/intel/pt.c
> @@ -1118,9 +1118,12 @@ static int pt_buffer_reset_markers(struct pt_buffer *buf,
> buf->intr_te = pt_topa_prev_entry(buf, buf->intr_te);
> }
>
> - buf->stop_te->stop = 1;
> - buf->stop_te->intr = 1;
> - buf->intr_te->intr = 1;
> + if (buf->stop_te) {
It really can't be NULL at this point.
Regards,
--
Alex
Powered by blists - more mailing lists