Re: [Qemu-devel] [Qemu-block] Unchecked blk_getlength() in device models and board code

2017-08-08 Thread Peter Maydell
On 8 August 2017 at 13:04, Stefan Hajnoczi wrote: > On Fri, Aug 04, 2017 at 04:01:18PM +0200, Markus Armbruster wrote: >> blk_getlength() can fail. I figure the following need fixing: >> >> hw/arm/musicpal.c: musicpal_init() > > Seems okay: > > flash_size = blk_getlength(blk); > if (flash_size !=

Re: [Qemu-devel] [Qemu-block] Unchecked blk_getlength() in device models and board code

2017-08-08 Thread Stefan Hajnoczi
On Fri, Aug 04, 2017 at 04:01:18PM +0200, Markus Armbruster wrote: > blk_getlength() can fail. I figure the following need fixing: > > hw/arm/musicpal.c: musicpal_init() Seems okay: flash_size = blk_getlength(blk); if (flash_size != 8*1024*1024 && flash_size != 16*1024*1024 && flash_size !=