Re: [PATCH] blkcg: check pol->cpd_free_fn before free cpd

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

 



On 10/10/2017 08:53 AM, weiping zhang wrote:
> check pol->cpd_free_fn() instead of pol->cpd_alloc_fn() when free cpd.

In practice this shouldn't make a difference, since if you have an
alloc_fn, you better also have a free_fn. I'd argue a better
patch would be ensuring that's the case, since the current situation
would at least oops and show you there's an issue, but with the patch
we'll just leak the memory.

I'll apply it, but would be nice if this was handled a bit more
proactively.

-- 
Jens Axboe




[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