Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 9 Aug 2012 19:26:58 +0100
From:      Attilio Rao <attilio@freebsd.org>
To:        Harald Schmalzbauer <h.schmalzbauer@omnilan.de>
Cc:        stable@freebsd.org, daichi@freebsd.org, Pavel Polyakov <bsd@kobyla.org>
Subject:   Re: lock violation in unionfs (9.0-STABLE r230270)
Message-ID:  <CAJ-FndDkuXksyFD2Nd-S7Ty3N8boSk37=a2nYagMkguRYd1r%2Bg@mail.gmail.com>
In-Reply-To: <5022840B.3060708@omnilan.de>
References:  <op.v9l1byf89gyv16@pp> <CAJ-FndAFMV2iHcMKvMruCP%2BHRzwQuY1Jcd_o6ZEnTCiPV8_8oA@mail.gmail.com> <op.waqux6rr9gyv16@cel.home> <5022840B.3060708@omnilan.de>

next in thread | previous in thread | raw e-mail | index | archive | help
--e0cb4efe309e78e8fb04c6d95f1e
Content-Type: text/plain; charset=UTF-8

On 8/8/12, Harald Schmalzbauer <h.schmalzbauer@omnilan.de> wrote:
>  schrieb Pavel Polyakov am 06.03.2012 11:20 (localtime):
>>>> mount -t unionfs -o noatime /usr /mnt
>>>>
>>>> insmntque: mp-safe fs and non-locked vp: 0xfffffe01d96704f0 is not
>>>> exclusive locked but should be
>>>> KDB: enter: lock violation
>>>
>>> Pavel,
>>> can you give a spin to this patch?:
>>> http://www.freebsd.org/~attilio/unionfs_missing_insmntque_lock.patch
>>>
>>> I think that the unlocking is due at that point as the vnode lock can
>>> be switch later on.
>>>
>>> Let me know what you think about it and what the test does.
>>
>> Thanks!
>> This patch fixes the problem with lock violation. Sorry I've tested it so
>> late.
>
> Hello,
>
> this patch still applies cleanly to RELENG_9_1. Was there another fix
> for the issue or has it just not been PR-sent and thus forgotten?

Can you and Pavel try the attached patch? Unfortunately I had no time
to test it, I just made in 5 free mins from a non-FreeBSD workstation,
then you should be able to tell me if it works or not, even compiling
it on a RELENG_9_1.
Please try with INVARIANTS option on.

Thanks,
Attilio


-- 
Peace can only be achieved by understanding - A. Einstein

--e0cb4efe309e78e8fb04c6d95f1e
Content-Type: text/x-patch; charset=US-ASCII; name="unionfs_nodeget.patch"
Content-Disposition: attachment; filename="unionfs_nodeget.patch"
Content-Transfer-Encoding: base64
X-Attachment-Id: file0

SW5kZXg6IHN5cy9mcy91bmlvbmZzL3VuaW9uX3N1YnIuYwo9PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0tLSBzeXMvZnMv
dW5pb25mcy91bmlvbl9zdWJyLmMJKHJldmlzaW9uIDIzOTE1MikKKysrIHN5cy9mcy91bmlvbmZz
L3VuaW9uX3N1YnIuYwkod29ya2luZyBjb3B5KQpAQCAtMjM3LDcgKzIzNyw4IEBAIHVuaW9uZnNf
bm9kZWdldChzdHJ1Y3QgbW91bnQgKm1wLCBzdHJ1Y3Qgdm5vZGUgKnVwCiAJCWlmICh2cCAhPSBO
VUxMVlApIHsKIAkJCXZyZWYodnApOwogCQkJKnZwcCA9IHZwOwotCQkJZ290byB1bmlvbmZzX25v
ZGVnZXRfb3V0OworCQkJbG9ja21ncih2cC0+dl92bmxvY2ssIExLX0VYQ0xVU0lWRSwgTlVMTCk7
CisJCQlyZXR1cm4gKDApOwogCQl9CiAJfQogCkBAIC0yNTUsMTcgKzI1NiwxOSBAQCB1bmlvbmZz
X25vZGVnZXQoc3RydWN0IG1vdW50ICptcCwgc3RydWN0IHZub2RlICp1cAogCSAqLwogCXVucCA9
IG1hbGxvYyhzaXplb2Yoc3RydWN0IHVuaW9uZnNfbm9kZSksCiAJICAgIE1fVU5JT05GU05PREUs
IE1fV0FJVE9LIHwgTV9aRVJPKTsKKwlpZiAocGF0aCAhPSBOVUxMKSB7CisJCXVucC0+dW5fcGF0
aCA9IChjaGFyICopCisJCSAgICBtYWxsb2MoY25wLT5jbl9uYW1lbGVuICsxLCBNX1VOSU9ORlNQ
QVRILCBNX1dBSVRPS3xNX1pFUk8pOworCQliY29weShjbnAtPmNuX25hb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Q7CiAJ
dnAtPnZfZGF0YSA9IHVucDsKIAorCWxvY2ttZ3IodnAtPnZfdm5sb2NrLCBMS19FWENMVVNJVkUs
IE5VTEwpOworCWVycm9yID0gaW5zbW50cXVlKHZwLCBtcCk7CisJaWYgKGVycm9yICE9IDApIHsK
KwkJaWYgKGR2cCAhPSBOVUxMVlApCisJCQl2cmVsZShkdnApOworCQlpZiAodXBwZXJ2cCAhPSBO
VUxMVlApCisJCQl2cmVsZSh1cHBlcnZwKTsKKwkJaWYgKGxvd2VydnAgIT0gTlVMTFZQKQorCQkJ
dnJlbGUobG93ZXJ2cCk7CisJCWZyZWUodW5wLT51bl9wYXRoLCBNX1VOSU9ORlNOT0RFKTsKKwkJ
ZnJlZSh1bnAsIE1fVU5JT05GU05PREUpOworCQlyZXR1cm4gKGVycm9yKTsKKwl9CiAJaWYgKCh1
cHBlcnZwICE9IE5VTExWUCAmJiB1bXAtPnVtX3VwcGVydnAgPT0gdXBwZXJ2cCkgJiYKIAkgICAg
KGxvd2VydnAgIT0gTlVMTFZQICYmIHVtcC0+dW1fbG93ZXJ2cCA9PSBsb3dlcnZwKSkKIAkJdnAt
PnZfdmZsYWcgfD0gVlZfUk9PVDsKQEAgLTMxNywxMSArMzI3LDYgQEAgdW5pb25mc19ub2RlZ2V0
KHN0cnVjdCBtb3VudCAqbXAsIHN0cnVjdCB2bm9kZSAqdXAKIAkJdnJlZih2cCk7CiAJfSBlbHNl
CiAJCSp2cHAgPSB2cDsKLQotdW5pb25mc19ub2RlZ2V0X291dDoKLQlpZiAobGtmbGFncyAmIExL
X1RZUEVfTUFTSykKLQkJdm5fbG9jayh2cCwgbGtmbGFncyB8IExLX1JFVFJZKTsKLQogCXJldHVy
biAoMCk7CiB9CiAK
--e0cb4efe309e78e8fb04c6d95f1e--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAJ-FndDkuXksyFD2Nd-S7Ty3N8boSk37=a2nYagMkguRYd1r%2Bg>