Re: [PATCH] thunderbolt: Initialize Thunderbolt bus earlier

From: David Miller
Date: Mon Oct 09 2017 - 13:31:06 EST


From: Mika Westerberg <mika.westerberg@xxxxxxxxxxxxxxx>
Date: Mon, 9 Oct 2017 16:22:34 +0300

> The 0day kbuild robot reports following crash:
...
> The reason is that both Thunderbolt bus and thunderbolt-net are build
> into the kernel image, and the latter is linked first because
> drivers/net comes before drivers/thunderbolt. Since both use
> module_init() thunderbolt-net ends up calling Thunderbolt bus functions
> too early triggering the above crash.
>
> Fix this by moving Thunderbolt bus initialization to happen earlier to
> make sure all the data structures are ready when Thunderbolt service
> drivers are initialized. To be on the safe side also add a check for
> properly initialized xdomain_property_dir to tb_register_property_dir().
>
> Reported-by: kernel test robot <fengguang.wu@xxxxxxxxx>
> Signed-off-by: Mika Westerberg <mika.westerberg@xxxxxxxxxxxxxxx>

Applied to net-next, thanks.