forked from Minki/linux
9999fe5df5
Group index is incremented on every new group parsed. Since the field is part of struct imx_pinctrl_soc_info, which is typically a global variable passed by the individual pinctrl-imx.c based driver, it does not get cleared automatically when re-probing the driver. This lead imx_pinctrl_parse_functions passing a group pointer which is outside of the allocated group space on second probe and onwards. Typically this ended up in a NULL pointer dereference when accessing the name field like this: Unable to handle kernel NULL pointer dereference at virtual address 00000000 ... PC is at strcmp+0x18/0x44 LR is at imx_dt_node_to_map+0xc4/0x290 Avoid this by setting group_index to 0 on probe. This has been observed when using DEBUG_TEST_DRIVER_REMOVE. Signed-off-by: Stefan Agner <stefan@agner.ch> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> |
||
---|---|---|
.. | ||
Kconfig | ||
Makefile | ||
pinctrl-imx1-core.c | ||
pinctrl-imx1.c | ||
pinctrl-imx1.h | ||
pinctrl-imx6dl.c | ||
pinctrl-imx6q.c | ||
pinctrl-imx6sl.c | ||
pinctrl-imx6sx.c | ||
pinctrl-imx6ul.c | ||
pinctrl-imx7d.c | ||
pinctrl-imx21.c | ||
pinctrl-imx23.c | ||
pinctrl-imx25.c | ||
pinctrl-imx27.c | ||
pinctrl-imx28.c | ||
pinctrl-imx35.c | ||
pinctrl-imx50.c | ||
pinctrl-imx51.c | ||
pinctrl-imx53.c | ||
pinctrl-imx.c | ||
pinctrl-imx.h | ||
pinctrl-mxs.c | ||
pinctrl-mxs.h | ||
pinctrl-vf610.c |