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] [day] [month] [year] [list]
Message-Id: <1247983259.11353.214.camel@localhost.localdomain>
Date:	Sun, 19 Jul 2009 09:00:59 +0300
From:	Artem Bityutskiy <dedekind@...radead.org>
To:	Tobias Diedrich <ranma@...edrich.de>
Cc:	linux-kernel@...r.kernel.org, linux-mtd@...ts.infradead.org
Subject: Re: block2mtd and ubi are initialized too early when compiled in
 on 2.6.31-rc2

On Thu, 2009-07-16 at 16:28 +0200, Tobias Diedrich wrote:
> Artem Bityutskiy wrote:
> > Hi,
> > 
> > On Wed, 2009-07-15 at 13:52 +0200, Tobias Diedrich wrote:
> > > On 2.6.31-rc2 the block2mtd drivers module_init is called before any
> > > block devices have been registered.
> > 
> > Hmm, ok. Is this because block devices are registered asynchronously?
> > Could you please point to the code where it is done, just for reference.
> 
> AFAICS yes.
> All module_init()s are called asynchronously from init/main.c:do_initcalls()

They are done in a kernel thread, but sequentially, one after the other.
So there is no real synchronicity there.

I think the real problem is that block-devices are probed/initialized
asynchronously. E.g., see 'ata_host_register()'. They call
'async_schedule()' which is doing the slow initialization in a separate
thread.

Thus, you probably should to try to add something like
'async_synchronize_full()' to the blk2mtd driver and wait for block
devices to initialize. Or indeed 'wait_for_device_probe()' may be what
you need.

-- 
Best regards,
Artem Bityutskiy (Битюцкий Артём)

--
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