[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YqGAb9ApjYEFHoEX@google.com>
Date: Thu, 9 Jun 2022 05:09:03 +0000
From: Tzung-Bi Shih <tzungbi@...nel.org>
To: Guenter Roeck <groeck@...gle.com>
Cc: Benson Leung <bleung@...omium.org>,
Guenter Roeck <groeck@...omium.org>,
"open list:CHROME HARDWARE PLATFORM SUPPORT"
<chrome-platform@...ts.linux.dev>,
linux-kernel <linux-kernel@...r.kernel.org>
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@...nel.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`).
Powered by blists - more mailing lists