Re: [PATCH] bdi: add check before create debugfs dir or files

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

 



On Thu, Oct 26, 2017 at 03:54:05PM +0200, Jan Kara wrote:
> On Wed 25-10-17 23:23:18, weiping zhang wrote:
> > we should make sure parents directory exist, and then create dir or
> > files under that.
> > 
> > Signed-off-by: weiping zhang <zhangweiping@xxxxxxxxxxxxxxx>
> 
> OK, this looks reasonable to me but instead of instead of just leaving
> debugfs in half-initialized state, we should rather properly tear it down,
> return error from bdi_debug_register() and handle it in
> bdi_register_va()...
> 
> 
At beginning I try to return error code to caller, then I find
bdi_register_owner's return value was not checked in device_add_disk,
so I think there may have some stories. But now, I found we must check
bdi_register_owner in device_add_disk, otherwise bdi may lead some
undefined behavior. blk_mq_debugfs_register also has same issue.

I will send new patch series to fix these issues.


--
weiping

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]
  Powered by Linux