[BUG] possible object lifetime bug

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

 



Hi Wolfram !

While running with debug objects and testing binding/unbinding some of
my drivers I hit the following backtrace. I think there's a problem
with the lifetime rules around i2cdev, possibly the embedded cdev, it's
a kobject, we probably shouldn't kfree it that way.

I'm bogged down with other things so can't really dig more now, but I
figured I'd let you know.

(As far as I can tell, this isn't cased by i2c-fsi.c itself, but more
something to do with the i2cdev core itself)

[  139.880200] WARNING: CPU: 0 PID: 1176 at lib/debugobjects.c:289 debug_print_object+0x94/0xc0
[  139.888655] ODEBUG: free active (active state 0) object type: timer_list hint: delayed_work_timer_fn+0x0/0x28
[  139.898559] Modules linked in:
[  139.901630] CPU: 0 PID: 1176 Comm: openpower-proc- Tainted: G        W       4.13.16-01464-g0861bce #180
[  139.911098] Hardware name: Generic DT based system
[  139.915933] [<8010a338>] (unwind_backtrace) from [<80106f10>] (show_stack+0x20/0x24)
[  139.923714] [<80106f10>] (show_stack) from [<805964b8>] (dump_stack+0x20/0x28)
[  139.930965] [<805964b8>] (dump_stack) from [<801169cc>] (__warn+0xe4/0x10c)
[  139.937945] [<801169cc>] (__warn) from [<80116a44>] (warn_slowpath_fmt+0x50/0x70)
[  139.945449] [<80116a44>] (warn_slowpath_fmt) from [<80337be4>] (debug_print_object+0x94/0xc0)
[  139.953992] [<80337be4>] (debug_print_object) from [<80338b80>] (debug_check_no_obj_freed+0x1b8/0x20c)
[  139.963316] [<80338b80>] (debug_check_no_obj_freed) from [<80219f04>] (kfree+0x68/0xc4)
[  139.971349] [<80219f04>] (kfree) from [<8042042c>] (i2cdev_detach_adapter.part.0+0x7c/0xcc)
[  139.979722] [<8042042c>] (i2cdev_detach_adapter.part.0) from [<80420750>] (i2cdev_notifier_call+0x60/0x6c)
[  139.989393] [<80420750>] (i2cdev_notifier_call) from [<80136728>] (notifier_call_chain+0x54/0x94)
[  139.998281] [<80136728>] (notifier_call_chain) from [<80136b30>] (__blocking_notifier_call_chain+0x58/0x70)
[  140.008031] [<80136b30>] (__blocking_notifier_call_chain) from [<80136b70>] (blocking_notifier_call_chain+0x28/0x30)
[  140.018567] [<80136b70>] (blocking_notifier_call_chain) from [<8038628c>] (device_del+0x4c/0x33c)
[  140.027453] [<8038628c>] (device_del) from [<803865a0>] (device_unregister+0x24/0x6c)
[  140.035300] [<803865a0>] (device_unregister) from [<8041bec0>] (i2c_del_adapter+0x1a0/0x248)
[  140.043753] [<8041bec0>] (i2c_del_adapter) from [<80421e54>] (fsi_i2c_remove+0x3c/0x50)
[  140.051784] [<80421e54>] (fsi_i2c_remove) from [<8038b0d0>] (device_release_driver_internal+0x15c/0x1f8)
[  140.061285] [<8038b0d0>] (device_release_driver_internal) from [<8038b18c>] (device_release_driver+0x20/0x24)
[  140.071214] [<8038b18c>] (device_release_driver) from [<80389b70>] (bus_remove_device+0xdc/0x140)
[  140.080095] [<80389b70>] (bus_remove_device) from [<80386440>] (device_del+0x200/0x33c)
[  140.088109] [<80386440>] (device_del) from [<803865a0>] (device_unregister+0x24/0x6c)
[  140.095973] [<803865a0>] (device_unregister) from [<8045f908>] (fsi_slave_remove_device+0x18/0x20)
[  140.104949] [<8045f908>] (fsi_slave_remove_device) from [<80385404>] (device_for_each_child+0x6c/0xac)
[  140.114273] [<80385404>] (device_for_each_child) from [<8045f8dc>] (fsi_master_remove_slave+0x24/0x38)
[  140.123597] [<8045f8dc>] (fsi_master_remove_slave) from [<80385404>] (device_for_each_child+0x6c/0xac)
[  140.132920] [<80385404>] (device_for_each_child) from [<804607e8>] (master_rescan_store+0x28/0x40)
[  140.141899] [<804607e8>] (master_rescan_store) from [<803847f0>] (dev_attr_store+0x28/0x34)
[  140.150267] [<803847f0>] (dev_attr_store) from [<80288b60>] (sysfs_kf_write+0x50/0x54)
[  140.158196] [<80288b60>] (sysfs_kf_write) from [<802881dc>] (kernfs_fop_write+0x100/0x204)
[  140.166477] [<802881dc>] (kernfs_fop_write) from [<8021cfc0>] (__vfs_write+0x44/0x154)
[  140.174405] [<8021cfc0>] (__vfs_write) from [<8021e7b4>] (vfs_write+0xb0/0x178)
[  140.181729] [<8021e7b4>] (vfs_write) from [<8021f800>] (SyS_write+0x58/0xbc)
[  140.188795] [<8021f800>] (SyS_write) from [<801028a0>] (ret_fast_syscall+0x0/0x3c)

Cheers,
Ben.



[Index of Archives]     [Linux GPIO]     [Linux SPI]     [Linux Hardward Monitoring]     [LM Sensors]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux