[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20241129171644.1c1be22fed23c949f9a9b29b@kernel.org>
Date: Fri, 29 Nov 2024 17:16:44 +0900
From: Masami Hiramatsu (Google) <mhiramat@...nel.org>
To: Steven Rostedt <rostedt@...dmis.org>
Cc: kernel test robot <lkp@...el.com>, "Masami Hiramatsu (Google)"
<mhiramat@...nel.org>, Naveen N Rao <naveen@...nel.org>,
llvm@...ts.linux.dev, oe-kbuild-all@...ts.linux.dev, Anil S Keshavamurthy
<anil.s.keshavamurthy@...el.com>, "David S . Miller" <davem@...emloft.net>,
Mathieu Desnoyers <mathieu.desnoyers@...icios.com>, Oleg Nesterov
<oleg@...hat.com>, Tzvetomir Stoyanov <tz.stoyanov@...il.com>,
linux-kernel@...r.kernel.org, linux-trace-kernel@...r.kernel.org
Subject: Re: [PATCH 6/6] tracing/dynevent: Adopt guard() and scoped_guard()
On Thu, 28 Nov 2024 11:57:56 -0500
Steven Rostedt <rostedt@...dmis.org> wrote:
> On Thu, 28 Nov 2024 16:42:47 +0800
> kernel test robot <lkp@...el.com> wrote:
>
> > 5448d44c38557f Masami Hiramatsu 2018-11-05 97 p = strchr(event, '/');
> > 5448d44c38557f Masami Hiramatsu 2018-11-05 98 if (p) {
> > 5448d44c38557f Masami Hiramatsu 2018-11-05 99 system = event;
> > 5448d44c38557f Masami Hiramatsu 2018-11-05 100 event = p + 1;
> > 5448d44c38557f Masami Hiramatsu 2018-11-05 101 *p = '\0';
> > 5448d44c38557f Masami Hiramatsu 2018-11-05 102 }
> > 95c104c378dc7d Linyu Yuan 2022-06-27 103 if (!system && event[0] == '\0') {
> > 8db403b9631331 Christophe JAILLET 2021-04-11 104 ret = -EINVAL;
> > 8db403b9631331 Christophe JAILLET 2021-04-11 @105 goto out;
>
> This is a legitimate bug. The "goto out" can't jump over a guard().
Hmm, OK. let me fix that.
Thanks!
>
> -- Steve
>
>
> > 8db403b9631331 Christophe JAILLET 2021-04-11 106 }
> > 5448d44c38557f Masami Hiramatsu 2018-11-05 107
> > 79cc5c1710963f Masami Hiramatsu (Google 2024-11-26 108) guard(mutex)(&event_mutex);
> > 5448d44c38557f Masami Hiramatsu 2018-11-05 109 for_each_dyn_event_safe(pos, n) {
> > 5448d44c38557f Masami Hiramatsu 2018-11-05 110 if (type && type != pos->ops)
> > 5448d44c38557f Masami Hiramatsu 2018-11-05 111 continue;
> > 30199137c899d7 Masami Hiramatsu 2019-06-20 112 if (!pos->ops->match(system, event,
> > d262271d04830e Masami Hiramatsu 2021-02-01 113 argc - 1, (const char **)argv + 1, pos))
> > cb8e7a8d55e052 Masami Hiramatsu 2019-06-20 114 continue;
> > cb8e7a8d55e052 Masami Hiramatsu 2019-06-20 115
> > 5448d44c38557f Masami Hiramatsu 2018-11-05 116 ret = pos->ops->free(pos);
> > cb8e7a8d55e052 Masami Hiramatsu 2019-06-20 117 if (ret)
> > 5448d44c38557f Masami Hiramatsu 2018-11-05 118 break;
> > 5448d44c38557f Masami Hiramatsu 2018-11-05 119 }
> > 4313e5a613049d Steven Rostedt (Google 2022-11-23 120) tracing_reset_all_online_cpus();
> > d262271d04830e Masami Hiramatsu 2021-02-01 121 out:
> > d262271d04830e Masami Hiramatsu 2021-02-01 122 argv_free(argv);
> > 5448d44c38557f Masami Hiramatsu 2018-11-05 123 return ret;
> > 5448d44c38557f Masami Hiramatsu 2018-11-05 124 }
> > 5448d44c38557f Masami Hiramatsu 2018-11-05 125
--
Masami Hiramatsu (Google) <mhiramat@...nel.org>
Powered by blists - more mailing lists