From: Mina Almasry <almasrymina@google.com>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Mike Kravetz <mike.kravetz@oracle.com>,
Andrew Morton <akpm@linux-foundation.org>,
Shuah Khan <shuah@kernel.org>,
Muchun Song <songmuchun@bytedance.com>,
linux-mm@kvack.org, linux-kselftest@vger.kernel.org,
kernel-janitors@vger.kernel.org
Subject: Re: [PATCH] selftest/vm: uninitialized variable in main()
Date: Tue, 19 Jul 2022 10:23:35 -0700 [thread overview]
Message-ID: <CAHS8izPXZx7htkby3j78RAqoHn2hXJqCiDP25XdsuTwj34AX4w@mail.gmail.com> (raw)
In-Reply-To: <YtZzjvHXVXMXxpXO@kili>
On Tue, Jul 19, 2022 at 2:04 AM Dan Carpenter <dan.carpenter@oracle.com> wrote:
>
> Initialize "length" to zero by default.
>
> Fixes: ff712a627f72 ("selftests/vm: cleanup hugetlb file after mremap test")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Thanks,
Reviewed-by: Mina Almasry <almasrymina@google.com>
> ---
> tools/testing/selftests/vm/hugepage-mremap.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tools/testing/selftests/vm/hugepage-mremap.c b/tools/testing/selftests/vm/hugepage-mremap.c
> index 585978f181ed..e63a0214f639 100644
> --- a/tools/testing/selftests/vm/hugepage-mremap.c
> +++ b/tools/testing/selftests/vm/hugepage-mremap.c
> @@ -107,7 +107,7 @@ static void register_region_with_uffd(char *addr, size_t len)
>
> int main(int argc, char *argv[])
> {
> - size_t length;
> + size_t length = 0;
>
> if (argc != 2 && argc != 3) {
> printf("Usage: %s [length_in_MB] <hugetlb_file>\n", argv[0]);
> --
> 2.35.1
>
next prev parent reply other threads:[~2022-07-19 17:23 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-19 9:04 Dan Carpenter
2022-07-19 17:23 ` Mina Almasry [this message]
2022-07-20 4:24 ` Muchun Song
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=CAHS8izPXZx7htkby3j78RAqoHn2hXJqCiDP25XdsuTwj34AX4w@mail.gmail.com \
--to=almasrymina@google.com \
--cc=akpm@linux-foundation.org \
--cc=dan.carpenter@oracle.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mike.kravetz@oracle.com \
--cc=shuah@kernel.org \
--cc=songmuchun@bytedance.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