From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35016) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aK1KP-0001v0-Sy for qemu-devel@nongnu.org; Fri, 15 Jan 2016 05:09:58 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aK1KM-0008V9-LU for qemu-devel@nongnu.org; Fri, 15 Jan 2016 05:09:57 -0500 Received: from mga04.intel.com ([192.55.52.120]:48456) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aK1KM-0008V2-G3 for qemu-devel@nongnu.org; Fri, 15 Jan 2016 05:09:54 -0500 From: Liang Li Date: Fri, 15 Jan 2016 18:06:08 +0800 Message-Id: <1452852370-11604-1-git-send-email-liang.z.li@intel.com> Subject: [Qemu-devel] (no subject) List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: amit.shah@redhat.com, zhang.zhanghailiang@huawei.com, Liang Li , dgilbert@redhat.com, quintela@redhat.com Subject: [PATCH RESEND v2 0/2] Fix flaw of qemu_put_compression_data 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 | 20 ++++++++------------ 2 files changed, 29 insertions(+), 14 deletions(-) -- 1.9.1