Bug #3094
closedkrbd: race between finding existing client and creating new one
0%
Description
In rbd_get_client(), an attempt is made to reuse an existing
rbd client if there is already one with matching options.
But the scan for the existing one and the creation of the new
one are not done (together/atomically) under protection of a
single lock, so it's possible with concurrent rbd_add() requests
to have multiple clients created which have the same ceph options.
I don't believe this is a serious problem but the code is not
working as intended so it should be fixed.
Updated by Alex Elder over 11 years ago
- Project changed from Linux kernel client to rbd
Updated by Alex Elder over 11 years ago
- Subject changed from rbd: race between finding existing client and creating new one to krbd: race between finding existing client and creating new one
Updated by Alex Elder almost 11 years ago
- Status changed from New to In Progress
I've been able to reproduce this problem by simply running
five instances of an "rbd map" command for the same image,
all in the background.
Updated by Alex Elder almost 11 years ago
- Status changed from In Progress to Fix Under Review
The following has been posted for review:
[PATCH] rbd: protect against duplicate client creation
Updated by Alex Elder almost 11 years ago
- Status changed from Fix Under Review to Resolved
The following has been committed to the "testing" branch
of the ceph-client git repository.
601e01d rbd: protect against duplicate client creation