diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2019-01-25 05:59:22 +1300 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2019-01-25 05:59:22 +1300 |
commit | 22a89a6b88e6db7328292491f564b54b13cc15fb (patch) | |
tree | a8569e5ab68c904250da73fc3d077847b8f66ce0 /net | |
parent | aa7b98459f15bf45d0610c8acfa7929a8641864a (diff) | |
parent | 74827ee29565f86e2a64495a5e3e58d3371d74ee (diff) |
Merge tag 'ceph-for-5.0-rc4' of git://github.com/ceph/ceph-client
Pull ceph fixes from Ilya Dryomov:
"A fix for a potential use-after-free, a patch to close a (mostly
benign) race in the messenger and a licence clarification for quota.c"
* tag 'ceph-for-5.0-rc4' of git://github.com/ceph/ceph-client:
ceph: quota: cleanup license mess
libceph: avoid KEEPALIVE_PENDING races in ceph_con_keepalive()
ceph: clear inode pointer when snap realm gets dropped by its inode
Diffstat (limited to 'net')
-rw-r--r-- | net/ceph/messenger.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/net/ceph/messenger.c b/net/ceph/messenger.c index d5718284db57..3661cdd927f1 100644 --- a/net/ceph/messenger.c +++ b/net/ceph/messenger.c @@ -3206,9 +3206,10 @@ void ceph_con_keepalive(struct ceph_connection *con) dout("con_keepalive %p\n", con); mutex_lock(&con->mutex); clear_standby(con); + con_flag_set(con, CON_FLAG_KEEPALIVE_PENDING); mutex_unlock(&con->mutex); - if (con_flag_test_and_set(con, CON_FLAG_KEEPALIVE_PENDING) == 0 && - con_flag_test_and_set(con, CON_FLAG_WRITE_PENDING) == 0) + + if (con_flag_test_and_set(con, CON_FLAG_WRITE_PENDING) == 0) queue_con(con); } EXPORT_SYMBOL(ceph_con_keepalive); |