On Thu, Nov 19, 2020 at 10:41:57AM +0100, Jan Kara wrote:
> >     rcu_assign_pointer(ptbl->part[0], &disk->part0);
> > @@ -1772,8 +1626,10 @@ struct gendisk *__alloc_disk_node(int minors, int 
> > node_id)
> >      * converted to make use of bd_mutex and sequence counters.
> >      */
> >     hd_sects_seq_init(&disk->part0);
> > -   if (hd_ref_init(&disk->part0))
> > -           goto out_free_part0;
> > +   if (hd_ref_init(&disk->part0)) {
> > +           hd_free_part(&disk->part0);
> 
> Aren't you missing kfree(disk) here?

This should actually jump to out_free_bdstats, I've fixed it up.

Reply via email to