From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Christian Marangi <ansuelsmth@gmail.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Dan Williams <dan.j.williams@intel.com>,
Jonathan Cameron <jonathan.cameron@huawei.com>,
Magnus Damm <damm@igel.co.jp>,
linux-kernel@vger.kernel.org,
"Rob Herring (Arm)" <robh@kernel.org>,
stable@vger.kernel.org
Subject: Re: [PATCH] resource: handle wrong resource_size value on zero start/end resource
Date: Mon, 8 Dec 2025 02:00:27 +0200 [thread overview]
Message-ID: <aTYVG-1H_i6lMOcm@smile.fi.intel.com> (raw)
In-Reply-To: <aTYUbPcpl9aVijpS@smile.fi.intel.com>
On Mon, Dec 08, 2025 at 01:57:37AM +0200, Andy Shevchenko wrote:
> On Mon, Dec 08, 2025 at 12:33:03AM +0100, Christian Marangi wrote:
...
> I think the better choice is to check all places where resource is assigned
> and convert that to a helper when the size can be or is 0. Definitely it's
> a lot of code to be audited.
>
> But having something like
>
> resource_set_size(res, 0) // note, this API is already in upstream
> or
> resource_set_range(res, start, 0)
>
> instead of direct assignment of start and end is much simpler approach.
Just run
git grep -n -w resource_set_range
and you see that even OF uses it in once case already. And PCI core is full of
the calls, that's why I believe PCI is not affected as it does the correct
thing to begin with.
--
With Best Regards,
Andy Shevchenko
next prev parent reply other threads:[~2025-12-08 0:00 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-07 21:53 [PATCH] resource: handle wrong resource_size value on zero start/end resource Christian Marangi
2025-12-07 23:12 ` Andy Shevchenko
2025-12-07 23:20 ` Christian Marangi
2025-12-07 23:46 ` Andy Shevchenko
2025-12-07 23:23 ` Andy Shevchenko
2025-12-07 23:33 ` Christian Marangi
2025-12-07 23:57 ` Andy Shevchenko
2025-12-08 0:00 ` Andy Shevchenko [this message]
2025-12-08 13:29 ` Ilpo Järvinen
2025-12-08 13:47 ` Christian Marangi
2025-12-08 15:03 ` Ilpo Järvinen
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=aTYVG-1H_i6lMOcm@smile.fi.intel.com \
--to=andriy.shevchenko@linux.intel.com \
--cc=akpm@linux-foundation.org \
--cc=ansuelsmth@gmail.com \
--cc=damm@igel.co.jp \
--cc=dan.j.williams@intel.com \
--cc=jonathan.cameron@huawei.com \
--cc=linux-kernel@vger.kernel.org \
--cc=robh@kernel.org \
--cc=stable@vger.kernel.org \
/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.