浏览代码

ceph: fix theoretically possible double-put on connection

This would only trigger if we bailed out before resetting r_con_filling_msg
because the server reply was corrupt (oversized).

Signed-off-by: Sage Weil <sage@newdream.net>
Sage Weil 15 年之前
父节点
当前提交
6f46cb2935
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      fs/ceph/osd_client.c

+ 1 - 0
fs/ceph/osd_client.c

@@ -1386,6 +1386,7 @@ static struct ceph_msg *get_reply(struct ceph_connection *con,
 		     req->r_reply, req->r_con_filling_msg);
 		ceph_con_revoke_message(req->r_con_filling_msg, req->r_reply);
 		ceph_con_put(req->r_con_filling_msg);
+		req->r_con_filling_msg = NULL;
 	}
 
 	if (front > req->r_reply->front.iov_len) {