Skip to contentSkip to conversation

lock context warnings

DISCUSSION Christoph Hellwig 2 participants 3 messages Jan 7, 2009 Sparse checker

lore
Share & tools
lore
#0 lore raw

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.

#1 lore raw
Quoted 2 lines · Christoph Hellwig

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.

#2 lore raw
Quoted 4 lines · Alexey Zaytsev
Quoted 2 lines · Christoph Hellwig

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

Quoted 8 lines

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.