debugfs removal fails after commit 653f0d05be09 ("simple_recursive_removal(): kernel-side rm -rf for ramfs-style filesystems")

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

 



Hello,

Commit 653f0d05be09 ("simple_recursive_removal(): kernel-side rm -rf for 
ramfs-style filesystems") triggers the following WARN in 
linux-next-20191210 for me (and later a panic):

WARNING: CPU: 0 PID: 1 at fs/dcache.c:338 dentry_free+0xa4/0xb0 

Call trace:
  dentry_free+0xa4/0xb0
  __dentry_kill+0x180/0x1c0
  dput+0x298/0x418
  simple_recursive_removal+0x22c/0x258
  debugfs_remove+0x5c/0x80
  opp_debug_remove_one+0x18/0x20
  _opp_kref_release+0x40/0x78
  dev_pm_opp_put+0x40/0x58
  _opp_remove_all_static+0x50/0x78
  _put_opp_list_kref+0x3c/0x50
  _dev_pm_opp_find_and_remove_table+0x2c/0x90
  dev_pm_opp_of_remove_table+0x14/0x20
  imx_devfreq_probe+0xf0/0x270

This goes away if I revert the patch.

My driver just does dev_pm_opp_of_add_table, encounters an error and 
then calls dev_pm_opp_of_remove_table to cleanup. This seems reasonable 
and is a common pattern in devfreq drivers but cleanup now crashes?

Calls from OPP debug code seem reasonable:

opp_debug_register(146): opp_dev=ffff0000b87be700
opp_list_debug_create_dir(112): opp_dev=ffff0000b87be700
opp_set_dev_name(24): dev=ffff0000b94c2810
opp_debug_create_supplies(45): opp=ffff0000b87be580
opp_debug_create_one(103): opp=ffff0000b87be580 dentry=ffff0000b8cdf8c0
opp_debug_create_supplies(45): opp=ffff0000b87be500
opp_debug_create_one(103): opp=ffff0000b87be500 dentry=ffff0000b8cf0240
opp_debug_create_supplies(45): opp=ffff0000b87be480
opp_debug_create_one(103): opp=ffff0000b87be480 dentry=ffff0000b8cf0b40
opp_debug_remove_one(34): opp=ffff0000b87be580 dentry=ffff0000b8cdf8c0

For some reason CONFIG_DEBUG_FS is no longer "y" on imx_v6_v7_defconfig 
but if enabled I also get similar problems on imx6 (trimmed):

WARNING: CPU: 1 PID: 1 at fs/dcache.c:338 dentry_free+0xb8/0xd0
[<c012df84>] (__warn)
[<c012e3d8>] (warn_slowpath_fmt)
[<c02ee68c>] (dentry_free)
[<c02ef174>] (__dentry_kill)
[<c02f0078>] (dput)
[<c0305150>] (simple_recursive_removal)
[<c04e32b4>] (debugfs_remove)
[<c06442d0>] (_regulator_put.part.0)
[<c06444b8>] (regulator_put)
[<c064b720>] (devm_regulator_release)
[<c07809fc>] (release_nodes)
[<c0780d24>] (devres_release_all)
[<c077b394>] (really_probe)
[<c077b9f8>] (driver_probe_device)
[<c077be0c>] (device_driver_attach)
[<c077be7c>] (__driver_attach)
[<c07791e8>] (bus_for_each_dev)
[<c077acc0>] (driver_attach)
[<c077a458>] (bus_add_driver)
[<c077ccb4>] (driver_register)
[<c095d870>] (i2c_register_driver)
[<c135d8a8>] (isl29018_driver_init)
[<c01033f4>] (do_one_initcall)
[<c1300fd4>] (kernel_init_freeable)
[<c0dea7e0>] (kernel_init)

Patch link is here, didn't find it on patchwork to reply:

https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit?id=653f0d05be0948e7610bb786e6570bb6c48a4e75

--
Regards,
Leonard




[Index of Archives]     [Linux Kernel]     [Linux USB Development]     [Yosemite News]     [Linux SCSI]

  Powered by Linux