From: kernel test robot <lkp@intel.com>
To: oe-kbuild@lists.linux.dev
Cc: lkp@intel.com, Dan Carpenter <error27@gmail.com>
Subject: [peterz-queue:perf/core 21/21] kernel/events/uprobes.c:718 hprobe_consume() error: uninitialized symbol 'state'.
Date: Wed, 30 Oct 2024 20:15:47 +0800 [thread overview]
Message-ID: <202410302020.1jHBLfss-lkp@intel.com> (raw)
BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
TO: Andrii Nakryiko <andrii@kernel.org>
CC: Peter Zijlstra <peterz@infradead.org>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git perf/core
head: 72a27524a4939fc0958796a46b51c1fab3729367
commit: 72a27524a4939fc0958796a46b51c1fab3729367 [21/21] uprobes: SRCU-protect uretprobe lifetime (with timeout)
:::::: branch date: 2 days ago
:::::: commit date: 2 days ago
config: i386-randconfig-141-20241030 (https://download.01.org/0day-ci/archive/20241030/202410302020.1jHBLfss-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Reported-by: Dan Carpenter <error27@gmail.com>
| Closes: https://lore.kernel.org/r/202410302020.1jHBLfss-lkp@intel.com/
smatch warnings:
kernel/events/uprobes.c:718 hprobe_consume() error: uninitialized symbol 'state'.
vim +/state +718 kernel/events/uprobes.c
72a27524a4939f Andrii Nakryiko 2024-10-23 695
72a27524a4939f Andrii Nakryiko 2024-10-23 696 /*
72a27524a4939f Andrii Nakryiko 2024-10-23 697 * hprobe_consume() fetches hprobe's underlying uprobe and detects whether
72a27524a4939f Andrii Nakryiko 2024-10-23 698 * uprobe is SRCU protected or is refcounted. hprobe_consume() can be
72a27524a4939f Andrii Nakryiko 2024-10-23 699 * used only once for a given hprobe.
72a27524a4939f Andrii Nakryiko 2024-10-23 700 *
72a27524a4939f Andrii Nakryiko 2024-10-23 701 * Caller has to call hprobe_finalize() and pass previous hprobe_state, so
72a27524a4939f Andrii Nakryiko 2024-10-23 702 * that hprobe_finalize() can perform SRCU unlock or put uprobe, whichever
72a27524a4939f Andrii Nakryiko 2024-10-23 703 * is appropriate.
72a27524a4939f Andrii Nakryiko 2024-10-23 704 */
72a27524a4939f Andrii Nakryiko 2024-10-23 705 static inline struct uprobe *hprobe_consume(struct hprobe *hprobe, enum hprobe_state *hstate)
72a27524a4939f Andrii Nakryiko 2024-10-23 706 {
72a27524a4939f Andrii Nakryiko 2024-10-23 707 enum hprobe_state state;
72a27524a4939f Andrii Nakryiko 2024-10-23 708
72a27524a4939f Andrii Nakryiko 2024-10-23 709 *hstate = xchg(&hprobe->state, HPROBE_CONSUMED);
72a27524a4939f Andrii Nakryiko 2024-10-23 710 switch (*hstate) {
72a27524a4939f Andrii Nakryiko 2024-10-23 711 case HPROBE_LEASED:
72a27524a4939f Andrii Nakryiko 2024-10-23 712 case HPROBE_STABLE:
72a27524a4939f Andrii Nakryiko 2024-10-23 713 return hprobe->uprobe;
72a27524a4939f Andrii Nakryiko 2024-10-23 714 case HPROBE_GONE: /* uprobe is NULL, no SRCU */
72a27524a4939f Andrii Nakryiko 2024-10-23 715 case HPROBE_CONSUMED: /* uprobe was finalized already, do nothing */
72a27524a4939f Andrii Nakryiko 2024-10-23 716 return NULL;
72a27524a4939f Andrii Nakryiko 2024-10-23 717 default:
72a27524a4939f Andrii Nakryiko 2024-10-23 @718 WARN(1, "hprobe invalid state %d", state);
72a27524a4939f Andrii Nakryiko 2024-10-23 719 return NULL;
72a27524a4939f Andrii Nakryiko 2024-10-23 720 }
72a27524a4939f Andrii Nakryiko 2024-10-23 721 }
72a27524a4939f Andrii Nakryiko 2024-10-23 722
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next reply other threads:[~2024-10-30 12:16 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-30 12:15 kernel test robot [this message]
-- strict thread matches above, loose matches on Subject: below --
2024-10-30 12:49 [peterz-queue:perf/core 21/21] kernel/events/uprobes.c:718 hprobe_consume() error: uninitialized symbol 'state' Dan Carpenter
2024-10-30 15:53 ` Andrii Nakryiko
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=202410302020.1jHBLfss-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.