Re: [PATCH v2] block: fix QEMU crash with scsi-hd and drive_del

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, May 24, 2018 at 11:09:47AM +0200, Greg Kurz wrote:
> diff --git a/block.c b/block.c
> index 676e57f5623a..fc9379439883 100644
> --- a/block.c
> +++ b/block.c
> @@ -2127,12 +2127,16 @@ BdrvChild *bdrv_attach_child(BlockDriverState *parent_bs,
>  
>  static void bdrv_detach_child(BdrvChild *child)
>  {
> +    BlockDriverState *child_bs = child->bs;
> +
>      if (child->next.le_prev) {
>          QLIST_REMOVE(child, next);
>          child->next.le_prev = NULL;
>      }

This child->next modification makes me nervous.  Please start the
drained region before modifying the graph.

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux