From: kernel test robot <lkp@intel.com>
To: oe-kbuild@lists.linux.dev
Cc: lkp@intel.com, Dan Carpenter <error27@gmail.com>
Subject: kernel/trace/fprobe.c:59 fprobe_handler() error: uninitialized symbol 'ret'.
Date: Tue, 16 May 2023 10:22:27 +0800 [thread overview]
Message-ID: <202305161040.Ex1agLyh-lkp@intel.com> (raw)
BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
CC: linux-kernel@vger.kernel.org
TO: "Masami Hiramatsu (Google)" <mhiramat@kernel.org>
CC: "Steven Rostedt (Google)" <rostedt@goodmis.org>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: f1fcbaa18b28dec10281551dfe6ed3a3ed80e3d6
commit: 39d954200bf6ad503c722e44d0be80c7b826fa42 fprobe: Skip exit_handler if entry_handler returns !0
date: 7 weeks ago
:::::: branch date: 30 hours ago
:::::: commit date: 7 weeks ago
config: i386-randconfig-m021-20230515 (https://download.01.org/0day-ci/archive/20230516/202305161040.Ex1agLyh-lkp@intel.com/config)
compiler: gcc-11 (Debian 11.3.0-12) 11.3.0
If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@intel.com>
| Reported-by: Dan Carpenter <error27@gmail.com>
| Link: https://lore.kernel.org/r/202305161040.Ex1agLyh-lkp@intel.com/
smatch warnings:
kernel/trace/fprobe.c:59 fprobe_handler() error: uninitialized symbol 'ret'.
vim +/ret +59 kernel/trace/fprobe.c
5b0ab78998e325 Masami Hiramatsu 2022-03-15 22
cad9931f64dc7f Masami Hiramatsu 2022-03-15 23 static void fprobe_handler(unsigned long ip, unsigned long parent_ip,
cad9931f64dc7f Masami Hiramatsu 2022-03-15 24 struct ftrace_ops *ops, struct ftrace_regs *fregs)
cad9931f64dc7f Masami Hiramatsu 2022-03-15 25 {
5b0ab78998e325 Masami Hiramatsu 2022-03-15 26 struct fprobe_rethook_node *fpr;
76d0de5729c056 Masami Hiramatsu (Google 2023-02-02 27) struct rethook_node *rh = NULL;
cad9931f64dc7f Masami Hiramatsu 2022-03-15 28 struct fprobe *fp;
76d0de5729c056 Masami Hiramatsu (Google 2023-02-02 29) void *entry_data = NULL;
39d954200bf6ad Masami Hiramatsu (Google 2023-02-02 30) int bit, ret;
cad9931f64dc7f Masami Hiramatsu 2022-03-15 31
cad9931f64dc7f Masami Hiramatsu 2022-03-15 32 fp = container_of(ops, struct fprobe, ops);
cad9931f64dc7f Masami Hiramatsu 2022-03-15 33 if (fprobe_disabled(fp))
cad9931f64dc7f Masami Hiramatsu 2022-03-15 34 return;
cad9931f64dc7f Masami Hiramatsu 2022-03-15 35
cad9931f64dc7f Masami Hiramatsu 2022-03-15 36 bit = ftrace_test_recursion_trylock(ip, parent_ip);
cad9931f64dc7f Masami Hiramatsu 2022-03-15 37 if (bit < 0) {
cad9931f64dc7f Masami Hiramatsu 2022-03-15 38 fp->nmissed++;
cad9931f64dc7f Masami Hiramatsu 2022-03-15 39 return;
cad9931f64dc7f Masami Hiramatsu 2022-03-15 40 }
cad9931f64dc7f Masami Hiramatsu 2022-03-15 41
5b0ab78998e325 Masami Hiramatsu 2022-03-15 42 if (fp->exit_handler) {
5b0ab78998e325 Masami Hiramatsu 2022-03-15 43 rh = rethook_try_get(fp->rethook);
5b0ab78998e325 Masami Hiramatsu 2022-03-15 44 if (!rh) {
5b0ab78998e325 Masami Hiramatsu 2022-03-15 45 fp->nmissed++;
5b0ab78998e325 Masami Hiramatsu 2022-03-15 46 goto out;
5b0ab78998e325 Masami Hiramatsu 2022-03-15 47 }
5b0ab78998e325 Masami Hiramatsu 2022-03-15 48 fpr = container_of(rh, struct fprobe_rethook_node, node);
5b0ab78998e325 Masami Hiramatsu 2022-03-15 49 fpr->entry_ip = ip;
76d0de5729c056 Masami Hiramatsu (Google 2023-02-02 50) if (fp->entry_data_size)
76d0de5729c056 Masami Hiramatsu (Google 2023-02-02 51) entry_data = fpr->data;
5b0ab78998e325 Masami Hiramatsu 2022-03-15 52 }
5b0ab78998e325 Masami Hiramatsu 2022-03-15 53
76d0de5729c056 Masami Hiramatsu (Google 2023-02-02 54) if (fp->entry_handler)
39d954200bf6ad Masami Hiramatsu (Google 2023-02-02 55) ret = fp->entry_handler(fp, ip, ftrace_get_regs(fregs), entry_data);
76d0de5729c056 Masami Hiramatsu (Google 2023-02-02 56)
39d954200bf6ad Masami Hiramatsu (Google 2023-02-02 57) /* If entry_handler returns !0, nmissed is not counted. */
39d954200bf6ad Masami Hiramatsu (Google 2023-02-02 58) if (rh) {
39d954200bf6ad Masami Hiramatsu (Google 2023-02-02 @59) if (ret)
39d954200bf6ad Masami Hiramatsu (Google 2023-02-02 60) rethook_recycle(rh);
39d954200bf6ad Masami Hiramatsu (Google 2023-02-02 61) else
76d0de5729c056 Masami Hiramatsu (Google 2023-02-02 62) rethook_hook(rh, ftrace_get_regs(fregs), true);
39d954200bf6ad Masami Hiramatsu (Google 2023-02-02 63) }
5b0ab78998e325 Masami Hiramatsu 2022-03-15 64 out:
cad9931f64dc7f Masami Hiramatsu 2022-03-15 65 ftrace_test_recursion_unlock(bit);
cad9931f64dc7f Masami Hiramatsu 2022-03-15 66 }
cad9931f64dc7f Masami Hiramatsu 2022-03-15 67 NOKPROBE_SYMBOL(fprobe_handler);
cad9931f64dc7f Masami Hiramatsu 2022-03-15 68
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests
next reply other threads:[~2023-05-16 2:22 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-16 2:22 kernel test robot [this message]
-- strict thread matches above, loose matches on Subject: below --
2023-05-08 5:17 kernel/trace/fprobe.c:59 fprobe_handler() error: uninitialized symbol 'ret' Dan Carpenter
2023-05-17 11:45 ` Masami Hiramatsu
2023-05-17 17:47 ` Dan Carpenter
2023-05-17 22:07 ` Masami Hiramatsu
2023-05-06 9:38 kernel test robot
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=202305161040.Ex1agLyh-lkp@intel.com \
--to=lkp@intel.com \
--cc=error27@gmail.com \
--cc=oe-kbuild@lists.linux.dev \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.