Received: from eggs.gnu.org ([2001:4830:134:3::10]:45878) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a5spw-0002bI-0V for qemu-devel@nongnu.org; Mon, 07 Dec 2015 05:16:04 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a5sps-0006Yq-0J for qemu-devel@nongnu.org; Mon, 07 Dec 2015 05:16:03 -0500 Received: from mga03.intel.com ([134.134.136.65]:60223) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a5spr-0006Yi-R0 for qemu-devel@nongnu.org; Mon, 07 Dec 2015 05:15:59 -0500 From: Liang Li Date: Mon, 7 Dec 2015 18:14:09 +0800 Message-Id: <1449483251-23232-1-git-send-email-liang.z.li@intel.com> Subject: [Qemu-devel] [v2 0/2] Fix flaw of qemu_put_compression_data List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: amit.shah@redhat.com, stefanha@gmail.com, Liang Li , dgilbert@redhat.com, quintela@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 | 20 ++++++++------------ 2 files changed, 29 insertions(+), 14 deletions(-) -- 1.9.1