Re: [bug report] RIP: 0010:blkg_free+0xa/0xe0 observed on latest linux-block/for-next

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

 



On Mon, Feb 6, 2023 at 2:53 PM Christoph Hellwig <hch@xxxxxx> wrote:
>
> This should fix it:

Thanks for the quick fix, will try to reproduce it on the reproduced
server and retest it.

>
> diff --git a/block/blk-cgroup.c b/block/blk-cgroup.c
> index 8faeca6022bea0..c46778d1f3c27d 100644
> --- a/block/blk-cgroup.c
> +++ b/block/blk-cgroup.c
> @@ -383,7 +383,8 @@ static struct blkcg_gq *blkg_create(struct blkcg *blkcg, struct gendisk *disk,
>  err_put_css:
>         css_put(&blkcg->css);
>  err_free_blkg:
> -       blkg_free(new_blkg);
> +       if (new_blkg)
> +               blkg_free(new_blkg);
>         return ERR_PTR(ret);
>  }
>
>


-- 
Best Regards,
  Yi Zhang




[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux