From: SeongJae Park <sj@kernel.org>
To: Dan Carpenter <dan.carpenter@linaro.org>
Cc: oe-kbuild@lists.linux.dev, SeongJae Park <sj@kernel.org>,
lkp@intel.com, oe-kbuild-all@lists.linux.dev,
damon@lists.linux.dev
Subject: Re: [sj:damon/next 32/42] mm/damon/core.c:1150 damos_set_effective_quota() error: uninitialized symbol 'esz'.
Date: Tue, 21 Nov 2023 17:36:02 +0000 [thread overview]
Message-ID: <20231121173602.62313-1-sj@kernel.org> (raw)
In-Reply-To: <473b4c2e-863d-42ec-860a-bf8ec4385240@suswa.mountain>
Hi Dan,
On Tue, 21 Nov 2023 02:37:12 -0500 Dan Carpenter <dan.carpenter@linaro.org> wrote:
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/sj/linux.git damon/next
> head: 54ffd8ae08121d8cbce1874fe46970cce643a2c7
> commit: 28cef0e565adbb4175f12ffffce9d0680979de60 [32/42] mm/damon/core: implement goal-oriented feedback-driven quota auto-tuning
> config: x86_64-randconfig-161-20231121 (https://download.01.org/0day-ci/archive/20231121/202311210420.URG3QSAS-lkp@intel.com/config)
> compiler: gcc-11 (Debian 11.3.0-12) 11.3.0
> reproduce: (https://download.01.org/0day-ci/archive/20231121/202311210420.URG3QSAS-lkp@intel.com/reproduce)
>
> 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/202311210420.URG3QSAS-lkp@intel.com/
>
> smatch warnings:
> mm/damon/core.c:1150 damos_set_effective_quota() error: uninitialized symbol 'esz'.
Thank you for this nice report!
However, damos_set_effective_quota() is called from damos_adjust_quota(), which
ensures at least one among quota->{ms,sz,get_score} is nonzero. And
damos_set_effective_quota() ensures quota->{ms,get_score} is non-zero at the
beginning of the function. Then the function sets esz anyway, for non-zero
quota->ms and quota->get_score. Hence the uninitialized variable usage cannot
happen, if I understand correctly. Please let me know if I'm missing
something.
Thanks,
SJ
next prev parent reply other threads:[~2023-11-21 17:36 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-21 7:37 [sj:damon/next 32/42] mm/damon/core.c:1150 damos_set_effective_quota() error: uninitialized symbol 'esz' Dan Carpenter
2023-11-21 17:36 ` SeongJae Park [this message]
2023-11-22 9:13 ` Dan Carpenter
2023-11-22 18:50 ` SeongJae Park
-- strict thread matches above, loose matches on Subject: below --
2023-11-20 20:01 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=20231121173602.62313-1-sj@kernel.org \
--to=sj@kernel.org \
--cc=damon@lists.linux.dev \
--cc=dan.carpenter@linaro.org \
--cc=lkp@intel.com \
--cc=oe-kbuild-all@lists.linux.dev \
--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.