linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* 0be964be0 "module: Sanitize RCU usage and locking" breaks symbol_put_addr?
@ 2015-08-17 23:20 Laura Abbott
  2015-08-18  2:31 ` Peter Zijlstra
  0 siblings, 1 reply; 5+ messages in thread
From: Laura Abbott @ 2015-08-17 23:20 UTC (permalink / raw)
  To: Peter Zijlstra, Rusty Russell; +Cc: Paul E. McKenney, Linux Kernel Mailing List

Hi,

We received a few bug backtraces:

[   41.536933] ------------[ cut here ]------------
[   41.537545] WARNING: CPU: 1 PID: 813 at kernel/module.c:291 module_assert_mutex_or_preempt+0x49/0x90()
[   41.538174] Modules linked in: mxl5007t af9013 ... dvb_usb_af9015(+) ... dvb_usb_v2 dvb_core rc_core ...
[   41.542457] CPU: 1 PID: 813 Comm: systemd-udevd Not tainted 4.2.0-0.rc6.git0.1.fc24.x86_64+debug #1
...
[   41.545938] Call Trace:
[   41.546607]  [<ffffffff81868d8e>] dump_stack+0x4c/0x65
[   41.547280]  [<ffffffff810ab406>] warn_slowpath_common+0x86/0xc0
[   41.547959]  [<ffffffffa057d0b0>] ? af9013_read_ucblocks+0x20/0x20 [af9013]
[   41.548633]  [<ffffffffa057d0b0>] ? af9013_read_ucblocks+0x20/0x20 [af9013]
[   41.549315]  [<ffffffff810ab53a>] warn_slowpath_null+0x1a/0x20
[   41.549994]  [<ffffffff81150529>] module_assert_mutex_or_preempt+0x49/0x90
[   41.550664]  [<ffffffff81150822>] __module_address+0x32/0x150
[   41.551346]  [<ffffffffa057d0b0>] ? af9013_read_ucblocks+0x20/0x20 [af9013]
[   41.552037]  [<ffffffffa057d0b0>] ? af9013_read_ucblocks+0x20/0x20 [af9013]
[   41.552684]  [<ffffffff81150956>] __module_text_address+0x16/0x70
[   41.553361]  [<ffffffffa057d0b0>] ? af9013_read_ucblocks+0x20/0x20 [af9013]
[   41.554049]  [<ffffffffa057d0b0>] ? af9013_read_ucblocks+0x20/0x20 [af9013]
[   41.554701]  [<ffffffff81150f19>] symbol_put_addr+0x29/0x40
[   41.555392]  [<ffffffffa04b77ad>] dvb_frontend_detach+0x7d/0x90 [dvb_core]
[   41.556078]  [<ffffffffa04cdfd5>] dvb_usbv2_probe+0xc85/0x11a0 [dvb_usb_v2]
[   41.556750]  [<ffffffffa05607c4>] af9015_probe+0x84/0xf0 [dvb_usb_af9015]
[   41.557483]  [<ffffffff8161c03b>] usb_probe_interface+0x1bb/0x2e0
[   41.558169]  [<ffffffff81579f26>] driver_probe_device+0x1f6/0x450
[   41.558837]  [<ffffffff8157a214>] __driver_attach+0x94/0xa0
[   41.559469]  [<ffffffff8157a180>] ? driver_probe_device+0x450/0x450
[   41.560126]  [<ffffffff815778f3>] bus_for_each_dev+0x73/0xc0
[   41.560748]  [<ffffffff815796fe>] driver_attach+0x1e/0x20
[   41.561442]  [<ffffffff8157922e>] bus_add_driver+0x1ee/0x280
[   41.562088]  [<ffffffff8157b0a0>] driver_register+0x60/0xe0
[   41.562712]  [<ffffffff8161a87d>] usb_register_driver+0xad/0x160
[   41.563348]  [<ffffffffa0567000>] ? 0xffffffffa0567000
[   41.563971]  [<ffffffffa056701e>] af9015_usb_driver_init+0x1e/0x1000 [dvb_usb_af9015]
[   41.564580]  [<ffffffff81002123>] do_one_initcall+0xb3/0x200
[   41.565210]  [<ffffffff8124ac65>] ? kmem_cache_alloc_trace+0x355/0x380
[   41.565834]  [<ffffffff81867c37>] ? do_init_module+0x28/0x1e9
[   41.566428]  [<ffffffff81867c6f>] do_init_module+0x60/0x1e9
[   41.567042]  [<ffffffff81154167>] load_module+0x21f7/0x28d0
[   41.567633]  [<ffffffff8114f600>] ? m_show+0x1b0/0x1b0
[   41.568252]  [<ffffffff81026d79>] ? sched_clock+0x9/0x10
[   41.568861]  [<ffffffff810e6ddc>] ? local_clock+0x1c/0x20
[   41.569453]  [<ffffffff811549b8>] SyS_init_module+0x178/0x1c0
[   41.570059]  [<ffffffff8187282e>] entry_SYSCALL_64_fastpath+0x12/0x76
[   41.570630] ---[ end trace 31a9dd90d4f559f5 ]---

Based on my understanding, this is spitting a warning that the module_mutex
isn't held. There's a nice comment in symbol_put_addr right before the call:

         /* module_text_address is safe here: we're supposed to have reference
          * to module from symbol_get, so it can't go away. */
         modaddr = __module_text_address(a);

so it looks like this is an erroneous warning which shouldn't need the mutex held.
Any ideas or am I off base here?

Thanks,
Laura

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-08-20  5:34 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-08-17 23:20 0be964be0 "module: Sanitize RCU usage and locking" breaks symbol_put_addr? Laura Abbott
2015-08-18  2:31 ` Peter Zijlstra
2015-08-18 20:49   ` Rusty Russell
2015-08-19 12:42     ` Peter Zijlstra
2015-08-20  1:10       ` Rusty Russell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).