From: Nicolin Chen <nicolinc@nvidia.com>
To: Alessandro Zanni <alessandrozanni.dev@gmail.com>
Cc: "Tian, Kevin" <kevin.tian@intel.com>,
"jgg@nvidia.com" <jgg@nvidia.com>,
"shuah@kernel.org" <shuah@kernel.org>,
"alessandro.zanni87@gmail.com" <alessandro.zanni87@gmail.com>,
"iommu@lists.linux.dev" <iommu@lists.linux.dev>,
"linux-kselftest@vger.kernel.org"
<linux-kselftest@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH rc] iommufd/selftest: Fix ioctl return value in _test_cmd_trigger_vevents()
Date: Thu, 16 Oct 2025 08:22:07 -0700 [thread overview]
Message-ID: <aPENnxVR+wtlGVAJ@Asurada-Nvidia> (raw)
In-Reply-To: <gn4l62kroj74d765uojx2vmu4tugxbmwnhodckfbath2pafeuz@nw2kudzcucv2>
On Thu, Oct 16, 2025 at 11:09:59AM +0200, Alessandro Zanni wrote:
> On Thu, Oct 16, 2025 at 07:47:20AM +0000, Tian, Kevin wrote:
> > > From: Nicolin Chen <nicolinc@nvidia.com>
> > > Sent: Wednesday, October 15, 2025 5:49 AM
> > >
> > > The ioctl returns 0 upon success, so !0 returning -1 breaks the selftest.
> > >
> > > Drop the '!' to fix it.
> > >
> > > Fixes: 1d235d849425 ("iommu/selftest: prevent use of uninitialized variable")
> > > Signed-off-by: Nicolin Chen <nicolinc@nvidia.com>
> >
> > Reviewed-by: Kevin Tian <kevin.tian@intel.com>
>
> With this fix a positive value returned by the ioctl() ends the loop and returns -1
> to the assert.
Not with this particular ioctl(). And in fact, I don't recall we
have an ioctl in iommufd uAPI that returns a positive value. All
the other ioctls in selftest check "if (ret)".
Nicolin
next prev parent reply other threads:[~2025-10-16 15:22 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-14 21:48 [PATCH rc] iommufd/selftest: Fix ioctl return value in _test_cmd_trigger_vevents() Nicolin Chen
2025-10-16 7:47 ` Tian, Kevin
2025-10-16 9:09 ` Alessandro Zanni
2025-10-16 15:22 ` Nicolin Chen [this message]
2025-10-20 23:01 ` Jason Gunthorpe
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=aPENnxVR+wtlGVAJ@Asurada-Nvidia \
--to=nicolinc@nvidia.com \
--cc=alessandro.zanni87@gmail.com \
--cc=alessandrozanni.dev@gmail.com \
--cc=iommu@lists.linux.dev \
--cc=jgg@nvidia.com \
--cc=kevin.tian@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=shuah@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.