Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fzap_cursor_move_to_key() should drop l_rwlock #1233

Closed
wants to merge 1 commit into from

Conversation

nedbass
Copy link
Contributor

@nedbass nedbass commented Jan 23, 2013

Callers of zap_deref_leaf() must be careful to drop leaf->l_rwlock
since that function returns with the lock held on success. All other
callers drop the lock correctly but it seems fzap_cursor_move_to_key()
does not. This may block writers or cause VERIFY failures when the
lock is freed.

Fixes #1215
Fixes openzfs/spl#143
Fixes openzfs/spl#97

Callers of zap_deref_leaf() must be careful to drop leaf->l_rwlock
since that function returns with the lock held on success.  All other
callers drop the lock correctly but it seems fzap_cursor_move_to_key()
does not.  This may block writers or cause VERIFY failures when the
lock is freed.

Fixes openzfs#1215
Fixes openzfs/spl#143
Fixes openzfs/spl#97
@behlendorf
Copy link
Contributor

It's somewhat amazing this issue didn't impact more people. This is likely because very few people need a fat zap for their snapshot names. The upgrade from micro to fat zap would occur for snapshot names longer than 50 characters or 128k worth of snapshot names. So that's the test case.

@nedbass
Copy link
Contributor Author

nedbass commented Jan 23, 2013

That would probably be good information to include in the commit message. Feel free to add it when you merge the patch.

@behlendorf
Copy link
Contributor

1305d33 fzap_cursor_move_to_key() should drop l_rwlock

@behlendorf behlendorf closed this Jan 24, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants