From: Andrew Morton <akpm@linux-foundation.org>
To: Suren Baghdasaryan <surenb@google.com>
Cc: kent.overstreet@linux.dev, dan.carpenter@linaro.org,
rppt@kernel.org, mcgrof@kernel.org, petr.pavlu@suse.com,
samitolvanen@google.com, da.gomez@samsung.com, yuzhao@google.com,
souravpanda@google.com, pasha.tatashin@soleen.com,
linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/1] alloc_tag: fix empty codetag module section handling
Date: Thu, 31 Oct 2024 17:45:57 -0700 [thread overview]
Message-ID: <20241031174557.18b8f408a6b810b3fe7468c6@linux-foundation.org> (raw)
In-Reply-To: <CAJuCfpGiFDPArB-3_oTvuMSy3=MVQWFW2K8f-k+M9G2EA0L+Mw@mail.gmail.com>
On Thu, 31 Oct 2024 17:13:58 -0700 Suren Baghdasaryan <surenb@google.com> wrote:
> On Thu, Oct 31, 2024 at 5:00 PM Suren Baghdasaryan <surenb@google.com> wrote:
> >
> > When a module does not have any allocations, it's allocation tag section
> > is empty and codetag_alloc_module_section() returns NULL. However this
> > condition should never happen because codetag_needs_module_section() will
> > detect an empty section and avoid calling codetag_alloc_module_section().
> > Change codetag_alloc_module_section() to never return NULL, which should
> > prevent static checker warnings. Add a WARN_ON() and a proper error
> > reporting in case codetag_alloc_module_section() returns NULL, to prevent
> > future codetag type implementations from returning NULL from their
> > cttype->desc.alloc_section_mem() operation.
> >
> > Fixes: 61c9e58f3a10 ("alloc_tag: load module tags into separate contiguous memory")
> > Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
> > Closes: https://lore.kernel.org/all/50f12fa1-17c1-4940-a6bf-beaf61f6b17a@stanley.mountain/
> > Signed-off-by: Suren Baghdasaryan <surenb@google.com>
>
> Andrew, I was going to respin v5 of my patchset and include all these
> small fixes in it but it's a bit tricky because I would have to revert
> another unrelated patch [1] from mm-unstable which refactors relevant
> code. So far the fixes are rather small, so I think you should not
> have much trouble folding them into the original patchset when the
> time comes, but if that becomes a problem I can prepare a new version.
>
No probs, thanks, I figured it out. The descriptions of
where-it-fits-and-why are helpful.
Of course we could just pile everything onto mm-unstable HEAD and live
with a messier commit history, but I think things are manageable at
present.
next prev parent reply other threads:[~2024-11-01 0:46 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-01 0:00 Suren Baghdasaryan
2024-11-01 0:13 ` Suren Baghdasaryan
2024-11-01 0:45 ` Andrew Morton [this message]
2024-11-01 7:04 ` Dan Carpenter
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=20241031174557.18b8f408a6b810b3fe7468c6@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=da.gomez@samsung.com \
--cc=dan.carpenter@linaro.org \
--cc=kent.overstreet@linux.dev \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mcgrof@kernel.org \
--cc=pasha.tatashin@soleen.com \
--cc=petr.pavlu@suse.com \
--cc=rppt@kernel.org \
--cc=samitolvanen@google.com \
--cc=souravpanda@google.com \
--cc=surenb@google.com \
--cc=yuzhao@google.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