From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55263) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aYn2K-0003Vx-6Z for qemu-devel@nongnu.org; Wed, 24 Feb 2016 22:56:20 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aYn2F-0000wi-7x for qemu-devel@nongnu.org; Wed, 24 Feb 2016 22:56:20 -0500 Received: from mga09.intel.com ([134.134.136.24]:31343) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aYn2F-0000vN-2D for qemu-devel@nongnu.org; Wed, 24 Feb 2016 22:56:15 -0500 From: Liang Li Date: Thu, 25 Feb 2016 11:50:25 +0800 Message-Id: <1456372227-10380-1-git-send-email-liang.z.li@intel.com> Subject: [Qemu-devel] [PATCH v3 0/2] Fix flaw of qemu_put_compression_data List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: quintela@redhat.com, amit.shah@redhat.com Cc: zhang.zhanghailiang@huawei.com, Liang Li , qemu-devel@nongnu.org, dgilbert@redhat.com The implementation of qemu_put_compression_data only consider the case QEMUFile is writable, it can't work with a writable QEMUFile and does not provide any measure to prevent users from using it with a writable QEMUFile. For safety, it should be improved to avoid some issues. ram_save_compressed_page can be refined based on the change of qemu_put_compression_data, very small improvement, but code looks better. Liang Li (2): qemu-file: Fix qemu_put_compression_data flaw migration: refine ram_save_compressed_page migration/qemu-file.c | 23 +++++++++++++++++++++-- migration/ram.c | 34 ++++++++++++++++++---------------- 2 files changed, 39 insertions(+), 18 deletions(-)