Re: [PATCH v3] driver core: auxiliary bus: Fix calling stage for auxiliary bus init

2021-02-11 Thread Greg KH
On Thu, Feb 11, 2021 at 09:21:29AM -0700, Dave Jiang wrote: > > On 2/10/2021 11:54 PM, Greg KH wrote: > > On Wed, Feb 10, 2021 at 01:16:11PM -0700, Dave Jiang wrote: > > > When the auxiliary device code is built into the kernel, it can be > > > executed > > > before the auxiliary bus is registere

Re: [PATCH v3] driver core: auxiliary bus: Fix calling stage for auxiliary bus init

2021-02-11 Thread Dave Jiang
On 2/10/2021 11:54 PM, Greg KH wrote: On Wed, Feb 10, 2021 at 01:16:11PM -0700, Dave Jiang wrote: When the auxiliary device code is built into the kernel, it can be executed before the auxiliary bus is registered. This causes bus->p to be not allocated and triggers a NULL pointer dereference w

Re: [PATCH v3] driver core: auxiliary bus: Fix calling stage for auxiliary bus init

2021-02-11 Thread Dave Jiang
On 2/11/2021 12:44 AM, Greg KH wrote: On Wed, Feb 10, 2021 at 01:16:11PM -0700, Dave Jiang wrote: MODULE_LICENSE("GPL v2"); MODULE_DESCRIPTION("Auxiliary Bus"); MODULE_AUTHOR("David Ertman "); As this code can not be built as a module, can you remove these lines as well? I don't think

Re: [PATCH v3] driver core: auxiliary bus: Fix calling stage for auxiliary bus init

2021-02-10 Thread Greg KH
On Wed, Feb 10, 2021 at 01:16:11PM -0700, Dave Jiang wrote: > MODULE_LICENSE("GPL v2"); > MODULE_DESCRIPTION("Auxiliary Bus"); > MODULE_AUTHOR("David Ertman "); As this code can not be built as a module, can you remove these lines as well? I don't think they do anything, and were never needed.

Re: [PATCH v3] driver core: auxiliary bus: Fix calling stage for auxiliary bus init

2021-02-10 Thread Greg KH
On Wed, Feb 10, 2021 at 01:16:11PM -0700, Dave Jiang wrote: > When the auxiliary device code is built into the kernel, it can be executed > before the auxiliary bus is registered. This causes bus->p to be not > allocated and triggers a NULL pointer dereference when the auxiliary bus > device gets a

[PATCH v3] driver core: auxiliary bus: Fix calling stage for auxiliary bus init

2021-02-10 Thread Dave Jiang
When the auxiliary device code is built into the kernel, it can be executed before the auxiliary bus is registered. This causes bus->p to be not allocated and triggers a NULL pointer dereference when the auxiliary bus device gets added with bus_add_device(). Call the auxiliary_bus_init() under driv