Re: [RFC v2 2/5] blktrace: fix debugfs use after free

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

 



On Sat, Apr 11, 2020 at 04:09:13PM -0700, Bart Van Assche wrote:
> On 2020-04-10 12:58, Luis Chamberlain wrote:
> > On Thu, Apr 09, 2020 at 07:52:59PM -0700, Bart Van Assche wrote:
> >> On 2020-04-09 14:45, Luis Chamberlain wrote:
> >>> +void blk_q_debugfs_register(struct request_queue *q)
> >>> +{
> >>> +	q->debugfs_dir = debugfs_create_dir(kobject_name(q->kobj.parent),
> >>> +					    blk_debugfs_root);
> >>> +}
> >>> +
> >>> +void blk_q_debugfs_unregister(struct request_queue *q)
> >>> +{
> >>> +	debugfs_remove_recursive(q->debugfs_dir);
> >>> +	q->debugfs_dir = NULL;
> >>> +}
> >>
> >> There are no other functions in the block layer that start with the
> >> prefix blk_q_. How about changing that prefix into blk_?
> > 
> > I the first patch already introduced blk_debugfs_register(), so I have
> > now changed the above to:
> > 
> > blk_debugfs_common_register()
> > blk_debugfs_common_unregister()
> > 
> > Let me know if something else is preferred.
> 
> I just realized that the "q" in "blk_q_" probably refers to the word
> "queue"? How about renaming these funtions into
> blk_queue_debugfs_register/unregister()?

Sure.

  Luis



[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