[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <gn4l62kroj74d765uojx2vmu4tugxbmwnhodckfbath2pafeuz@nw2kudzcucv2>
Date: Thu, 16 Oct 2025 11:09:59 +0200
From: Alessandro Zanni <alessandrozanni.dev@...il.com>
To: "Tian, Kevin" <kevin.tian@...el.com>
Cc: Nicolin Chen <nicolinc@...dia.com>, "jgg@...dia.com" <jgg@...dia.com>,
"shuah@...nel.org" <shuah@...nel.org>, "alessandro.zanni87@...il.com" <alessandro.zanni87@...il.com>,
"iommu@...ts.linux.dev" <iommu@...ts.linux.dev>,
"linux-kselftest@...r.kernel.org" <linux-kselftest@...r.kernel.org>, "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH rc] iommufd/selftest: Fix ioctl return value in
_test_cmd_trigger_vevents()
On Thu, Oct 16, 2025 at 07:47:20AM +0000, Tian, Kevin wrote:
> > From: Nicolin Chen <nicolinc@...dia.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@...dia.com>
>
> Reviewed-by: Kevin Tian <kevin.tian@...el.com>
With this fix a positive value returned by the ioctl() ends the loop and returns -1
to the assert.
Maybe better to put ioctl()<0 in the if condition?
Powered by blists - more mailing lists