From: kernel test robot <lkp@intel.com>
To: Eiichi Tsukata <eiichi.tsukata@nutanix.com>,
paul@paul-moore.com, eparis@redhat.com,
linux-kernel@vger.kernel.org, audit@vger.kernel.org
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
Eiichi Tsukata <eiichi.tsukata@nutanix.com>
Subject: Re: [PATCH 4/4] audit: check if queue is full after prepare_to_wait_exclusive()
Date: Tue, 9 May 2023 01:13:11 +0800 [thread overview]
Message-ID: <202305090112.uJSc0NBw-lkp@intel.com> (raw)
In-Reply-To: <20230508075812.76077-5-eiichi.tsukata@nutanix.com>
Hi Eiichi,
kernel test robot noticed the following build warnings:
[auto build test WARNING on pcmoore-audit/next]
[also build test WARNING on linus/master v6.4-rc1 next-20230508]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Eiichi-Tsukata/audit-refactor-queue-full-checks/20230508-160019
base: https://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/audit.git next
patch link: https://lore.kernel.org/r/20230508075812.76077-5-eiichi.tsukata%40nutanix.com
patch subject: [PATCH 4/4] audit: check if queue is full after prepare_to_wait_exclusive()
config: i386-randconfig-a001-20230508 (https://download.01.org/0day-ci/archive/20230509/202305090112.uJSc0NBw-lkp@intel.com/config)
compiler: clang version 14.0.6 (https://github.com/llvm/llvm-project f28c006a5895fc0e329fe15fead81e37457cb1d1)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/intel-lab-lkp/linux/commit/cbc69d0c34bdbc06ebca3e3020cfc24034fcf173
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Eiichi-Tsukata/audit-refactor-queue-full-checks/20230508-160019
git checkout cbc69d0c34bdbc06ebca3e3020cfc24034fcf173
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=i386 olddefconfig
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=i386 SHELL=/bin/bash
If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@intel.com>
| Link: https://lore.kernel.org/oe-kbuild-all/202305090112.uJSc0NBw-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> kernel/audit.c:651:6: warning: variable 'rtime' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
if (audit_queue_full(&audit_queue)) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
kernel/audit.c:657:9: note: uninitialized use occurs here
return rtime;
^~~~~
kernel/audit.c:651:2: note: remove the 'if' if its condition is always true
if (audit_queue_full(&audit_queue)) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
kernel/audit.c:642:12: note: initialize the variable 'rtime' to silence this warning
long rtime;
^
= 0
1 warning generated.
vim +651 kernel/audit.c
630
631 /**
632 * wait_for_kauditd - Wait for kauditd to drain the queue
633 * @stime: time to sleep
634 *
635 * Description:
636 * Waits for kauditd to drain the queue then adds duration of sleep time to
637 * audit_backlog_wait_time_actual as cumulative sum.
638 * Returns remaining time to sleep.
639 */
640 static long wait_for_kauditd(long stime)
641 {
642 long rtime;
643 DEFINE_WAIT(wait);
644
645 prepare_to_wait_exclusive(&audit_backlog_wait, &wait,
646 TASK_UNINTERRUPTIBLE);
647
648 /* need to check if the queue is full again because kauditd might have
649 * flushed the queue and went to sleep after prepare_to_wait_exclusive()
650 */
> 651 if (audit_queue_full(&audit_queue)) {
652 rtime = schedule_timeout(stime);
653 atomic_add(stime - rtime, &audit_backlog_wait_time_actual);
654 }
655 finish_wait(&audit_backlog_wait, &wait);
656
657 return rtime;
658 }
659
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests
next parent reply other threads:[~2023-05-08 17:13 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20230508075812.76077-5-eiichi.tsukata@nutanix.com>
2023-05-08 17:13 ` kernel test robot [this message]
2023-05-09 1:44 ` [PATCH 4/4] audit: check if queue is full after prepare_to_wait_exclusive() Eiichi Tsukata
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=202305090112.uJSc0NBw-lkp@intel.com \
--to=lkp@intel.com \
--cc=audit@vger.kernel.org \
--cc=eiichi.tsukata@nutanix.com \
--cc=eparis@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=llvm@lists.linux.dev \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=paul@paul-moore.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).