Re: [dhowells-fs:afs-next] BUILD REGRESSION 0c4555b845cdb41cc48a5831ec7c8d08df686062

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Looks like we can CC this to the sparse list.  -fengguang

On Sat, Mar 31, 2018 at 11:23:23AM +0100, David Howells wrote:
kbuild test robot <fengguang.wu@xxxxxxxxx> wrote:

fs/afs/dynroot.c:114:38: sparse: context imbalance in 'afs_lookup_atcell' - different lock contexts for basic block
fs/afs/proc.c:353:38: sparse: context imbalance in 'afs_proc_rootcell_read' - different lock contexts for basic block

sparse doesn't seem to understand how read_seqbegin_or_lock() works.  The
following construct confuses it:

	unsigned int seq = 0;
	...
	do {
		read_seqbegin_or_lock(&lock, &seq);
		/* ... access locked variables ... */
	} while (need_seqretry(&lock, seq));
	done_seqretry(&lock, seq);

because the actual start of the lock is the seq = 0.  read_seqbegin_or_lock()
has to be passed through twice if you find you actually need the lock and this
confuses sparse's count.

David

--
To unsubscribe from this list: send the line "unsubscribe linux-sparse" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Newbies FAQ]     [LKML]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Trinity Fuzzer Tool]

  Powered by Linux