From: Catalin Marinas <catalin.marinas@arm.com>
To: Omkar Wagle <ov.wagle@gmail.com>
Cc: akpm@linux-foundation.org, linux-mm@kvack.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mm: kmemleak: Remove security and coding style warning
Date: Sat, 11 Nov 2023 12:25:12 +0000 [thread overview]
Message-ID: <ZU9yqGF0l5rs0SWX@arm.com> (raw)
In-Reply-To: <20231110191102.2029-1-ov.wagle@gmail.com>
On Fri, Nov 10, 2023 at 11:11:02AM -0800, Omkar Wagle wrote:
> @@ -368,6 +367,7 @@ static void print_unreferenced(struct seq_file *seq,
>
> for (i = 0; i < nr_entries; i++) {
> void *ptr = (void *)entries[i];
> +
> warn_or_seq_printf(seq, " [<%pK>] %pS\n", ptr, ptr);
> }
> }
> @@ -406,10 +406,11 @@ static struct kmemleak_object *__lookup_object(unsigned long ptr, int alias,
> unsigned long untagged_ptr = (unsigned long)kasan_reset_tag((void *)ptr);
>
> while (rb) {
> - struct kmemleak_object *object;
> + struct kmemleak_object *object = NULL;
Seriously, what's this initialisation for?
> unsigned long untagged_objp;
>
> object = rb_entry(rb, struct kmemleak_object, rb_node);
The variable gets assigned here.
> +
> untagged_objp = (unsigned long)kasan_reset_tag((void *)object->pointer);
I'm also not a fan of random whitespace updates throughout this file. It
makes backporting fixes harder later on.
--
Catalin
prev parent reply other threads:[~2023-11-11 12:25 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-10 19:11 [PATCH] mm: kmemleak: Remove security and coding style warning Omkar Wagle
2023-11-10 19:15 ` Matthew Wilcox
2023-11-11 12:25 ` Catalin Marinas [this message]
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=ZU9yqGF0l5rs0SWX@arm.com \
--to=catalin.marinas@arm.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=ov.wagle@gmail.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 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.