Re: [PATCH 2/2] blk-ioprio: remove per-disk structure

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

 



On Fri, Jul 12, 2024 at 09:10:30AM +0800, Yu Kuai wrote:
> > As one can see in the output of git grep -nHEB1 '>pd_(alloc|free)_fn\(',
> > none of the pd_alloc_fn / pd_free_fn callers checks whether or not these
> > pointers are NULL. Hence my question why this patch does not trigger any
> > NULL pointer dereferences?
> 
> Because the blkcg_deactivate_policy() is removed as well, there are no
> callers now... blkcg_policy_register() is still called to make sure
> cpd_(alloc|free)_fn will still be called.

Can you throw in a patch documenting this?  Any maybe add a check
that pd_alloc_fn / pd_free_fn exist in blkcg_activate_policy and
WARN and return an error otherwise?





[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