[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CACRpkdZ_GP3hz1yM+cJk_6U5-tshgnRau1WKdx8PNgoMOZmcHQ@mail.gmail.com>
Date: Wed, 14 May 2025 00:14:20 +0200
From: Linus Walleij <linus.walleij@...aro.org>
To: Doug Anderson <dianders@...omium.org>
Cc: Bartosz Golaszewski <bartosz.golaszewski@...aro.org>,
Dmitry Baryshkov <dmitry.baryshkov@....qualcomm.com>, Bjorn Andersson <andersson@...nel.org>,
Guenter Roeck <linux@...ck-us.net>, Josh Cartwright <joshc@...eaurora.org>,
Matti Vaittinen <mazziesaccount@...il.com>, linux-arm-msm@...r.kernel.org,
linux-gpio@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/4] pinctrl: qcom: don't crash on enabling GPIO HOG pins
On Tue, May 13, 2025 at 5:08 PM Doug Anderson <dianders@...omium.org> wrote:
> On Tue, May 13, 2025 at 2:27 AM Linus Walleij <linus.walleij@...aro.org> wrote:
> >
> > Hi Dmitry,
> >
> > thanks for your patch!
> >
> > On Tue, May 6, 2025 at 7:28 PM Bartosz Golaszewski
> > <bartosz.golaszewski@...aro.org> wrote:
> > > On Sat, 3 May 2025 at 07:32, Dmitry Baryshkov
> > > <dmitry.baryshkov@....qualcomm.com> wrote:
> >
> > > > + /*
> > > > + * hog pins are requested before registering GPIO chip, don't crash in
> > > > + * gpiochip_line_is_valid().
> > > > + */
> > > > + if (!chip->gpiodev)
> > > > + return 0;
> > > > +
> > >
> > > I really dislike you dereferencing gpiodev here which is (implicitly,
> > > I know...) very much a private structure for GPIOLIB. Can we move this
> > > into gpiochip_line_is_valid() itself?
> >
> > I agree with Bartosz. Patch gpiochip_line_is_valid() so everyone
> > can benefit from the extended check.
>
> Any chance we can get a solution landed sooner rather than later?
> Every time I test mainline I have to account for this bug or my device
> crashes at bootup. ;-)
Normally at this point in the development cycle only super-crititcal
patches go to the -rc (v6.15) but I trust you more than most so I take
it this is one of those, so we will need to funnel this to Torvalds as
soon as there is an acceptable patch.
Yours,
Linus Walleij
Powered by blists - more mailing lists