From mboxrd@z Thu Jan 1 00:00:00 1970 From: AKASHI Takahiro Date: Wed, 3 Mar 2021 09:48:52 +0900 Subject: [BUG] segmentation fault in efi_firmware_fit_get_image_info() In-Reply-To: <297dea6e-a3e8-597e-5663-d969254f26c2@gmx.de> References: <297dea6e-a3e8-597e-5663-d969254f26c2@gmx.de> Message-ID: <20210303004852.GC10164@laputa> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Lukasz, On Tue, Mar 02, 2021 at 08:14:46PM +0100, Heinrich Schuchardt wrote: > Hello Takahiro, > > Jose's ESRT implementation calls efi_firmware_fit_get_image_info() > multiple times. This results in a segmentation fault in the depths of > dfu_free_entities() involving device_chld_remove(). > > I used > > env set dfu_alt_info "sf 0:0=u-boot-bin raw 0x100000 0x50000;u-boot-env > raw 0x150000 0x200000" > > for testing on sandbox_defconfig. > > If I comment out the dfu_free_entities() calls the segmentation fault is > avoided. > > Could you, please, check with Lukasz when and if you should call > dfu_free_entities() in efi_get_dfu_info(). I'm not sure yet, but dfu_init_env_entities() and dfu_free_entities() are always paired in get_image_info() as in other use cases like dfu and thordown commands. -Takahiro Akashi > Best regards > > Heinrich