[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CACRpkdZ=WangdT-RA1qCO4BaN64dVhOcODrubPtk5b0C8cGaVQ@mail.gmail.com>
Date: Wed, 7 Oct 2020 10:33:02 +0200
From: Linus Walleij <linus.walleij@...aro.org>
To: Enric Balletbo i Serra <enric.balletbo@...labora.com>
Cc: "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Collabora Kernel ML <kernel@...labora.com>,
Matthias Brugger <matthias.bgg@...il.com>,
Nicolas Boichat <drinkcat@...omium.org>, hsinyi@...omium.org,
Sean Wang <sean.wang@...nel.org>,
Linux ARM <linux-arm-kernel@...ts.infradead.org>,
"open list:GPIO SUBSYSTEM" <linux-gpio@...r.kernel.org>,
"moderated list:ARM/Mediatek SoC support"
<linux-mediatek@...ts.infradead.org>
Subject: Re: [PATCH v3] pinctrl: mediatek: Free eint data on failure
On Thu, Oct 1, 2020 at 4:25 PM Enric Balletbo i Serra
<enric.balletbo@...labora.com> wrote:
> The pinctrl driver can work without the EINT resource, but, if it is
> expected to have this resource but the mtk_build_eint() function fails
> after allocating their data (because can't get the resource or can't map
> the irq), the data is not freed and you end with a NULL pointer
> dereference. Fix this by freeing the data if mtk_build_eint() fails, so
> pinctrl still works and doesn't hang.
Patch applied after rebasing it. It wasn't entirely trivial so
check the result.
This will not apply on elder kernels and is now targeted for
v5.10. Fixes for v5.9 and stable will have to be backported once this
is upstream.
Yours,
Linus Walleij
Powered by blists - more mailing lists