linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Laura Abbott <labbott@redhat.com>
To: Peter Zijlstra <peterz@infradead.org>,
	Rusty Russell <rusty@rustcorp.com.au>
Cc: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: 0be964be0 "module: Sanitize RCU usage and locking" breaks symbol_put_addr?
Date: Mon, 17 Aug 2015 16:20:09 -0700	[thread overview]
Message-ID: <55D26C29.5040204@redhat.com> (raw)

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

             reply	other threads:[~2015-08-17 23:20 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-17 23:20 Laura Abbott [this message]
2015-08-18  2:31 ` 0be964be0 "module: Sanitize RCU usage and locking" breaks symbol_put_addr? Peter Zijlstra
2015-08-18 20:49   ` Rusty Russell
2015-08-19 12:42     ` Peter Zijlstra
2015-08-20  1:10       ` Rusty Russell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=55D26C29.5040204@redhat.com \
    --to=labbott@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=paulmck@linux.vnet.ibm.com \
    --cc=peterz@infradead.org \
    --cc=rusty@rustcorp.com.au \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).