Page MenuHomeFreeBSD

lookup: do not return vp_crossmp as dvp for mount over the reg file
Needs ReviewPublic

Authored by kib on Sun, Jul 12, 12:04 PM.
Tags
None
Referenced Files
F163135680: D58191.id.diff
Mon, Jul 20, 10:07 AM
F163086256: D58191.diff
Sun, Jul 19, 11:11 PM
Unknown Object (File)
Sun, Jul 19, 10:33 AM
Unknown Object (File)
Sun, Jul 19, 12:38 AM
Unknown Object (File)
Sat, Jul 18, 8:28 PM
Unknown Object (File)
Sat, Jul 18, 8:24 PM
Unknown Object (File)
Sat, Jul 18, 4:24 PM
Unknown Object (File)
Sat, Jul 18, 4:19 PM

Details

Reviewers
olce
markj
jah
Summary

Return the covered vnode instead.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

kib requested review of this revision.Sun, Jul 12, 12:04 PM

I think this is a good structural fix - running it locally with no issues so far

kib removed a subscriber: olce.

Can we add a regression test case for this? I will write one if someone will sketch out what needs to happen.

Can we add a regression test case for this? I will write one if someone will sketch out what needs to happen.

I missed D58178.

Can we add a regression test case for this? I will write one if someone will sketch out what needs to happen.

I missed D58178.

I think it makes more sense to add this to stress2. Also it should get the rename() test. I will talk with Peter about it.

sys/kern/vfs_lookup.c
1492
1509

I think you have the lock flags and lock state parameters flipped around here.

1517

We did not acquire a usecount ref on ndp->ni_dvp, but in the error path we call vrele(ndp->ni_dvp).

kib marked 3 inline comments as done.Mon, Jul 13, 6:21 PM
kib added inline comments.
sys/kern/vfs_lookup.c
1509

Yes, Peter also reported the issue, I fixed it on the branch.

kib marked an inline comment as done.

Сorrect arguments and simplify the vn_lock_pair() call. No need for the locked variable.
vref(mvp) unconditionally to pacify the error path.

I ran all of the stress2 tests without seeing any issues.

In D58191#1337590, @pho wrote:

I ran all of the stress2 tests without seeing any issues.

Also the specific tests for the situation in PR282596 were run. It seems that the change is enough.