Re: [PATCH] block: genhd: fix double kfree() in __alloc_disk_node()

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

 



On Mon, Sep 20, 2021 at 05:02:19PM +0900, Tetsuo Handa wrote:
> On 2021/09/20 15:40, Christoph Hellwig wrote:
> > I was going to suggest to just move the bd_disk initialization after
> > the bd_stats allocations,  but iseems like we currently don't even
> > the zero the bdev on allocation.  So I suspect we should do that first
> > to avoid nasty surprises.
> 
> Hmm? bdev_alloc_inode() zeros the bdev on allocation.
> Are you talking about some other function?

Ah yes, we do.  Sorry, not enough coffee yet.  So in that case I think
you can simply move the bd_disk asignment later to simplify the
first hunk.



[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