[PATCH v3] pinctrl: mediatek: Free eint data on failure
Linus Walleij
linus.walleij at linaro.org
Wed Oct 7 04:33:02 EDT 2020
On Thu, Oct 1, 2020 at 4:25 PM Enric Balletbo i Serra
<enric.balletbo at collabora.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
More information about the linux-arm-kernel
mailing list