[Intel-gfx] ✗ Fi.CI.SPARSE: warning for Fix TLB invalidate issues with Broadwell (rev4)

Mauro Carvalho Chehab mauro.chehab at linux.intel.com
Mon Jul 11 06:16:52 UTC 2022


On Fri, 8 Jul 2022 10:29:42 -0400
Rodrigo Vivi <rodrigo.vivi at intel.com> wrote:

> On Thu, Jul 07, 2022 at 02:47:57PM -0000, Patchwork wrote:
> > == Series Details ==
> > 
> > Series: Fix TLB invalidate issues with Broadwell (rev4)
> > URL   : https://patchwork.freedesktop.org/series/105167/
> > State : warning
> > 
> > == Summary ==
> > 
> > Error: dim sparse failed
> > Sparse version: v0.6.2
> > Fast mode used, each commit won't be checked separately.
> > -
> > +drivers/gpu/drm/i915/gt/intel_reset.c:1410:5: warning: context imbalance in 'intel_gt_reset_trylock' - different lock contexts for basic block  
> 
> I believe this is a false positive, but worth double checking...

It is. Sparse usually complains when it sees patterns like:

foo_lock()
{
	some_lock();
}

foo_unlock()
{
	some_unlock();
}

as this is not easy for it to check. It even complains when there are multiple
unlocks at the same function. From my experiences, the only pattern that would
shut up such kind of warning is something like:

some_function()
{

	some_lock();

	...
	if(err)
		goto unlock;
	...

unlock:
	some_unlock();
}

with just one lock and just one unlock call, both at the same function.

-

Besides that, in this specific case, intel_gt_reset_trylock() internally
calls:

	*srcu = srcu_read_lock(&gt->reset.backoff_srcu);

and intel_gt_reset_unlock() is an alias for:

	        srcu_read_unlock(&gt->reset.backoff_srcu, tag);

Now, I've no idea why this warning was shown by the bot, as none of the
patches touch nor add new calls to intel_gt_reset_* functions.

It sounds to me that the bot is just printing an already-existing false
positive.

Regards,
Mauro


More information about the Intel-gfx mailing list