linux-sparse.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* lock context warnings
@ 2009-01-07  8:45 Christoph Hellwig
  2009-01-07  9:20 ` Alexey Zaytsev
  0 siblings, 1 reply; 3+ messages in thread
From: Christoph Hellwig @ 2009-01-07  8:45 UTC (permalink / raw)
  To: linux-sparse

Since a few month sparse keeps spewing tons of wrong lock context
warnings like:

/home/hch/work/linux-2.6/fs/xfs/quota/xfs_dquot.c:1341:24: warning:
context problem in 'xfs_qm_dqflush_done': 'xfs_trans_ail_delete'
expected different context
/home/hch/work/linux-2.6/fs/xfs/quota/xfs_dquot.c:1341:24:    context
'xa_lock': wanted >= 1, got 0
/home/hch/work/linux-2.6/fs/xfs/quota/xfs_dquot_item.c:565:22: warning:
context problem in 'xfs_qm_qoffend_logitem_committed':
'xfs_trans_ail_delete' expected different context
/home/hch/work/linux-2.6/fs/xfs/quota/xfs_dquot_item.c:565:22:
context 'xa_lock': wanted >= 1, got 0

which mean lock context annotations just don't seem to work, e.g. the
fist one is:

		/* xfs_trans_ail_delete() drops the AIL lock. */
		spin_lock(&ailp->xa_lock);
		if (qip->qli_item.li_lsn == qip->qli_flush_lsn)	
			xfs_trans_ail_delete(ailp, (xfs_log_item_t*)qip);
		else
			spin_unlock(&ailp->xa_lock);


where xfs_trans_ail_delete prototyped as:

void                    xfs_trans_ail_delete(struct xfs_ail *ailp,
                                        struct xfs_log_item *lip)
					__releases(ailp->xa_lock);


These messages are highly annoying in a kernel build, so if you can't
fix them easily, please at least remove the lock context stuff from
the default check flags.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: lock context warnings
  2009-01-07  8:45 lock context warnings Christoph Hellwig
@ 2009-01-07  9:20 ` Alexey Zaytsev
  2009-01-07 16:34   ` Christoph Hellwig
  0 siblings, 1 reply; 3+ messages in thread
From: Alexey Zaytsev @ 2009-01-07  9:20 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: linux-sparse

On Wed, Jan 7, 2009 at 11:45, Christoph Hellwig <hch@lst.de> wrote:
> Since a few month sparse keeps spewing tons of wrong lock context
> warnings like:

Yes, the warnings are wrong, and the patches that were supposeed to
fix them breoke other things, so they were never merged.
Christopher reverted the patches that introduced the new warnings
in his tree: git://git.kernel.org/pub/scm/devel/sparse/chrisl/sparse.git
until someone fixes or rewrites the context checking.

It looks like Christopher is serious about maintaining this tree, so
people should probably switch to using it.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: lock context warnings
  2009-01-07  9:20 ` Alexey Zaytsev
@ 2009-01-07 16:34   ` Christoph Hellwig
  0 siblings, 0 replies; 3+ messages in thread
From: Christoph Hellwig @ 2009-01-07 16:34 UTC (permalink / raw)
  To: Alexey Zaytsev; +Cc: Christoph Hellwig, linux-sparse

On Wed, Jan 07, 2009 at 12:20:18PM +0300, Alexey Zaytsev wrote:
> On Wed, Jan 7, 2009 at 11:45, Christoph Hellwig <hch@lst.de> wrote:
> > Since a few month sparse keeps spewing tons of wrong lock context
> > warnings like:
> 
> Yes, the warnings are wrong, and the patches that were supposeed to
> fix them breoke other things, so they were never merged.
> Christopher reverted the patches that introduced the new warnings
> in his tree: git://git.kernel.org/pub/scm/devel/sparse/chrisl/sparse.git
> until someone fixes or rewrites the context checking.
> 
> It looks like Christopher is serious about maintaining this tree, so
> people should probably switch to using it.

That tree looks much better, only a few lock context warnings left which
look legit from a first scan.  I'll keep using that tree for now.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-01-07 16:34 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-07  8:45 lock context warnings Christoph Hellwig
2009-01-07  9:20 ` Alexey Zaytsev
2009-01-07 16:34   ` Christoph Hellwig

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).