From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57219) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aHTBz-00049B-7z for qemu-devel@nongnu.org; Fri, 08 Jan 2016 04:18:43 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aHTBu-00015f-4n for qemu-devel@nongnu.org; Fri, 08 Jan 2016 04:18:43 -0500 Sender: Paolo Bonzini References: <1448294400-476-1-git-send-email-kwolf@redhat.com> <1448294400-476-14-git-send-email-kwolf@redhat.com> From: Paolo Bonzini Message-ID: <568F7EE6.10004@redhat.com> Date: Fri, 8 Jan 2016 10:18:30 +0100 MIME-Version: 1.0 In-Reply-To: <1448294400-476-14-git-send-email-kwolf@redhat.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v2 13/21] block: Introduce bs->explicit_options List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin Wolf , qemu-block@nongnu.org Cc: qemu-devel@nongnu.org, mreitz@redhat.com On 23/11/2015 16:59, Kevin Wolf wrote: > + bs->explicit_options = qdict_clone_shallow(options); qdict_clone_shallow dereferences options, and other parts of bdrv_open_inherit assume options != NULL. You can remove the first part of this condition, some 50 lines below: /* Check if any unknown options were used */ if (options && (qdict_size(options) != 0)) { Thanks, Paolo > + > if (child_role) { > bs->inherits_from = parent; > child_role->inherit_options(&flags, options,