Re: Revert "module: error out early on concurrent load of the same module file"

From: Linus Torvalds
Date: Tue May 30 2023 - 17:57:22 EST


On Tue, May 30, 2023 at 5:43 PM Dan Williams <dan.j.williams@xxxxxxxxx> wrote:
>
> [ add linux-cxl ]
>
> Sedat Dilek wrote:
> > Hi,
> >
> > after building Linux v6.4-rc4 I can NOT boot into my Debian GNU/Linux
> > AMD64 system with root-ext4 (/dev/sdc2 - of course using UUID in
> > /etc/fstab).
>
> I did not find a mailing-list thread for "9828ed3f695a module: error out early
> on concurrent load of the same module file", so replying here.

It is this thread:

https://lore.kernel.org/lkml/20230524213620.3509138-1-mcgrof@xxxxxxxxxx/

which initially proposed a different solution, then that "just reject
concurrent loads", and after that caused problems, there's yet another
proposal at

https://lore.kernel.org/lkml/CAHk-=wg7ihygotpO9x5a6QJO5oAom9o91==L_Kx-gUHvRYuXiQ@xxxxxxxxxxxxxx/

although if you want to try out that approach, Johan pointed out a
missing initialization of a spinlock in that patch in a reply there.

> Just wanted to highlight this a test case for the next attempt at this
> fix.

See above: the next attempt won't be until 6.5, but if you saw the
failure on your test-cases, it might be a good idea to check out that
next attempt early..

Linus