Messages in this thread | | | Date | Thu, 9 Jun 2022 05:09:03 +0000 | From | Tzung-Bi Shih <> | Subject | Re: [PATCH v3 13/23] platform/chrome: cros_ec: don't allocate `din` and `dout` in cros_ec_register() |
| |
On Wed, Jun 08, 2022 at 09:15:56AM -0700, Guenter Roeck wrote: > On Wed, Jun 8, 2022 at 4:08 AM Tzung-Bi Shih <tzungbi@kernel.org> wrote: > > > > Don't allocate `din` and `dout` in cros_ec_register() as they will be > > allocated soon in cros_ec_query_all().
Pardon me, I should test them earlier.
I misunderstood. The patch will cause kernel crash (NULL dereference) because cros_ec_query_all() relies on `din` and `dout` for getting protocol info and then it reallocates the buffers according to the info later.
I think we should just leave them as they are. Will drop this patch and next patch ([v3,14/23] platform/chrome: don't use devm variants for `din` and `dout`).
| |