On 11/13/19 10:18, Gerd Hoffmann wrote:
> Specifically port->driver.lchs needs clearing, otherwise seabios will

s/driver/drive/

> try interpret whatever random crap happens to be there as disk geometry,
> which may or may not break boot depending on how lucky you are.
> 
> Signed-off-by: Gerd Hoffmann <kra...@redhat.com>
> ---
>  src/hw/ahci.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/src/hw/ahci.c b/src/hw/ahci.c
> index 97a072a1ca81..d45b4307ec68 100644
> --- a/src/hw/ahci.c
> +++ b/src/hw/ahci.c
> @@ -345,6 +345,7 @@ ahci_port_alloc(struct ahci_ctrl_s *ctrl, u32 pnr)
>          warn_noalloc();
>          return NULL;
>      }
> +    memset(port, 0, sizeof(*port));
>      port->pnr = pnr;
>      port->ctrl = ctrl;
>      port->list = memalign_tmp(1024, 1024);
> 

Reviewed-by: Laszlo Ersek <ler...@redhat.com>


Reply via email to