From: Paolo Abeni <pabeni@redhat.com>
To: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>,
Andrew Lunn <andrew@lunn.ch>
Cc: netdev@vger.kernel.org, jiri@resnulli.us, davem@davemloft.net,
edumazet@google.com, kuba@kernel.org, horms@kernel.org,
pierre@stackhpc.com, Dan Carpenter <error27@gmail.com>
Subject: Re: [net v1] devlink: fix xa_alloc_cyclic error handling
Date: Tue, 18 Feb 2025 12:56:48 +0100 [thread overview]
Message-ID: <c22f5a47-7fe0-4e83-8a0c-6da78143ceb3@redhat.com> (raw)
In-Reply-To: <Z69MESaQ4cUvIy4z@mev-dev.igk.intel.com>
On 2/14/25 2:58 PM, Michal Swiatkowski wrote:
> On Fri, Feb 14, 2025 at 02:44:49PM +0100, Andrew Lunn wrote:
>> On Fri, Feb 14, 2025 at 02:24:53PM +0100, Michal Swiatkowski wrote:
>>> Pierre Riteau <pierre@stackhpc.com> found suspicious handling an error
>>> from xa_alloc_cyclic() in scheduler code [1]. The same is done in
>>> devlink_rel_alloc().
>>
>> If the same bug exists twice it might exist more times. Did you find
>> this instance by searching the whole tree? Or just networking?
>>
>> This is also something which would be good to have the static
>> analysers check for. I wounder if smatch can check this?
>>
>> Andrew
>>
>
> You are right, I checked only net folder and there are two usage like
> that in drivers. I will send v2 with wider fixing, thanks.
While at that, please add the suitable fixes tag(s).
Thanks,
Paolo
next prev parent reply other threads:[~2025-02-18 11:56 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-14 13:24 [net v1] devlink: fix xa_alloc_cyclic error handling Michal Swiatkowski
2025-02-14 13:44 ` Andrew Lunn
2025-02-14 13:58 ` Michal Swiatkowski
2025-02-14 14:14 ` Andrew Lunn
2025-02-18 11:56 ` Paolo Abeni [this message]
2025-03-10 11:42 ` Pierre Riteau
2025-03-11 9:16 ` Michal Swiatkowski
2025-03-11 11:49 ` Dan Carpenter
2025-03-11 12:09 ` Michal Swiatkowski
2025-02-16 15:06 ` Dan Carpenter
2025-02-16 16:08 ` Andrew Lunn
2025-02-17 7:46 ` Dan Carpenter
2025-02-17 6:57 ` 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=c22f5a47-7fe0-4e83-8a0c-6da78143ceb3@redhat.com \
--to=pabeni@redhat.com \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=error27@gmail.com \
--cc=horms@kernel.org \
--cc=jiri@resnulli.us \
--cc=kuba@kernel.org \
--cc=michal.swiatkowski@linux.intel.com \
--cc=netdev@vger.kernel.org \
--cc=pierre@stackhpc.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.