mirror of
https://github.com/torvalds/linux.git
synced 2026-06-02 11:33:28 +02:00
If a connection is closed and/or reopened (ceph_con_close, ceph_con_open)
it can race with a callback. con_work does various state checks for
closed or reopened sockets at the beginning, but drops con->mutex before
making callbacks. We need to check for state bit changes after retaking
the lock to ensure we restart con_work and execute those CLOSED/OPENING
tests or else we may end up operating under stale assumptions.
In Jim's case, this was causing 'bad tag' errors.
There are four cases where we re-take the con->mutex inside con_work: catch
them all and return EAGAIN from try_{read,write} so that we can restart
con_work.
Reported-by: Jim Schutt <jaschut@sandia.gov>
Tested-by: Jim Schutt <jaschut@sandia.gov>
Signed-off-by: Sage Weil <sage@newdream.net>
|
||
|---|---|---|
| .. | ||
| crush | ||
| armor.c | ||
| auth_none.c | ||
| auth_none.h | ||
| auth_x_protocol.h | ||
| auth_x.c | ||
| auth_x.h | ||
| auth.c | ||
| buffer.c | ||
| ceph_common.c | ||
| ceph_fs.c | ||
| ceph_hash.c | ||
| ceph_strings.c | ||
| crypto.c | ||
| crypto.h | ||
| debugfs.c | ||
| Kconfig | ||
| Makefile | ||
| messenger.c | ||
| mon_client.c | ||
| msgpool.c | ||
| osd_client.c | ||
| osdmap.c | ||
| pagelist.c | ||
| pagevec.c | ||