lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAH6sp9OK0gLFdv4DX3kMzi4cmYUE0P1mnGrqwWoFd9TYWi5kUw@mail.gmail.com>
Date:	Thu, 16 Apr 2015 09:34:25 +0200
From:	Frans Klaver <fransklaver@...il.com>
To:	Huang Ying <ying.huang@...el.com>
Cc:	Brian Norris <computersforpeace@...il.com>,
	LKML <linux-kernel@...r.kernel.org>, LKP ML <lkp@...org>
Subject: Re: [LKP] [mtd] 6b44d910ae7: WARNING: CPU: 0 PID: 0 at
 kernel/locking/lockdep.c:3547 check_flags+0xae/0x17b()

On Thu, Apr 16, 2015 at 7:27 AM, Huang Ying <ying.huang@...el.com> wrote:
> FYI, we noticed the below changes on
>
> git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
> commit 6b44d910ae7de5316fcf1fc828ff4a8d48cac5e2 ("mtd: core: set some defaults when dev.parent is set")
>
> <panic>

I would then expect that this is actually caused by
29b4dacc55b0cb079e5b4be2fbc494e138a7d110 (mtd: nand: docg4: show
parent device in sysfs), which effectively replaces mtd->owner with
the automated value. I just noticed that
module_platform_driver_probe() doesn't set the owner like
module_platform_driver() does. I think I expected this with the spi
based drivers, but not the platform devices.

I think we'd best fix module_platform_driver_probe, but I'm happy to
send in a patch that restores "mtd->owner = THIS_MODULE" with these
drivers, if that's preferred.

I don't have a device around that actually uses
module_platform_driver_probe, so to confirm that this is actually the
problem, could you try the appended patch (hoping that the gmail
interface doesn't mess with the whitespace)?

Thanks for catching,
Frans

--->8---
 drivers/mtd/nand/docg4.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/mtd/nand/docg4.c b/drivers/mtd/nand/docg4.c
index 510c12d..0d44636 100644
--- a/drivers/mtd/nand/docg4.c
+++ b/drivers/mtd/nand/docg4.c
@@ -1380,6 +1380,7 @@ static int __exit cleanup_docg4(struct
platform_device *pdev)
 static struct platform_driver docg4_driver = {
  .driver = {
  .name = "docg4",
+ .owner = THIS_MODULE,
  },
  .suspend = docg4_suspend,
  .resume = docg4_resume,
--
2.3.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ