diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-10-29 08:49:25 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-10-29 08:49:25 -0700 |
commit | 35fd3dc58da675d659513384221349ef90749a01 (patch) | |
tree | 2ee64e48f39c0c14d454d57a8af022af9e977dd4 /net/ceph | |
parent | 6b0cb4eef7bdaa27b8021ea81813fba330a2d94d (diff) | |
parent | 52eb5a900a9863a8b77a895f770e5d825c8e02c6 (diff) |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client
Pull Ceph fixes form Sage Weil:
"There are two fixes in the messenger code, one that can trigger a NULL
dereference, and one that error in refcounting (extra put). There is
also a trivial fix that in the fs client code that is triggered by NFS
reexport."
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client:
ceph: fix dentry reference leak in encode_fh()
libceph: avoid NULL kref_put when osd reset races with alloc_msg
rbd: reset BACKOFF if unable to re-queue
Diffstat (limited to 'net/ceph')
-rw-r--r-- | net/ceph/messenger.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/net/ceph/messenger.c b/net/ceph/messenger.c index 159aa8bef9e..3ef1759403b 100644 --- a/net/ceph/messenger.c +++ b/net/ceph/messenger.c @@ -2300,10 +2300,11 @@ restart: mutex_unlock(&con->mutex); return; } else { - con->ops->put(con); dout("con_work %p FAILED to back off %lu\n", con, con->delay); + set_bit(CON_FLAG_BACKOFF, &con->flags); } + goto done; } if (con->state == CON_STATE_STANDBY) { @@ -2749,7 +2750,8 @@ static int ceph_con_in_msg_alloc(struct ceph_connection *con, int *skip) msg = con->ops->alloc_msg(con, hdr, skip); mutex_lock(&con->mutex); if (con->state != CON_STATE_OPEN) { - ceph_msg_put(msg); + if (msg) + ceph_msg_put(msg); return -EAGAIN; } con->in_msg = msg; |