After patch b96eea718bf6 ("pinctrl: fsl: add scu based pinctrl support"),
NO_PAD_CTL pads map are not skipped anymore which results in
a possible memory corruption. As we actually only need to create config
maps for SCU pads and MMIO pads which are not using the default config
(a.k.a IMX_NO_PAD_CTL), so let's add a proper check before creating
the config maps. And during MMIO pads parsing, we also need update the
list_p point as SCU case to ensure the pin data next parsed is correct.
Cc: Linus Walleij <redacted>
Fixes: b96eea718bf6 ("pinctrl: fsl: add scu based pinctrl support")
Reported-by: Martin Kaiser <redacted>
Suggested-by: Leonard Crestez <redacted>
Signed-off-by: Dong Aisheng <aisheng.dong@nxp.com>
---
drivers/pinctrl/freescale/pinctrl-imx.c | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
From: Martin Kaiser <hidden> Date: 2018-11-12 15:47:55
Hi Dong,
your patch looks good to me.
Thus wrote A.s. Dong (aisheng.dong at nxp.com):
After patch b96eea718bf6 ("pinctrl: fsl: add scu based pinctrl support"),
NO_PAD_CTL pads map are not skipped anymore which results in
a possible memory corruption. As we actually only need to create config
maps for SCU pads and MMIO pads which are not using the default config
(a.k.a IMX_NO_PAD_CTL), so let's add a proper check before creating
the config maps. And during MMIO pads parsing, we also need update the
list_p point as SCU case to ensure the pin data next parsed is correct.
Cc: Linus Walleij <redacted>
Fixes: b96eea718bf6 ("pinctrl: fsl: add scu based pinctrl support")
Reported-by: Martin Kaiser <redacted>
Suggested-by: Leonard Crestez <redacted>
Signed-off-by: Dong Aisheng <aisheng.dong@nxp.com>
From: Leonard Crestez <hidden> Date: 2018-11-12 17:20:00
On Mon, 2018-11-12 at 15:25 +0000, A.s. Dong wrote:
After patch b96eea718bf6 ("pinctrl: fsl: add scu based pinctrl support"),
NO_PAD_CTL pads map are not skipped anymore which results in
a possible memory corruption. As we actually only need to create config
maps for SCU pads and MMIO pads which are not using the default config
(a.k.a IMX_NO_PAD_CTL), so let's add a proper check before creating
the config maps. And during MMIO pads parsing, we also need update the
list_p point as SCU case to ensure the pin data next parsed is correct.
Cc: Linus Walleij <redacted>
Fixes: b96eea718bf6 ("pinctrl: fsl: add scu based pinctrl support")
Reported-by: Martin Kaiser <redacted>
Suggested-by: Leonard Crestez <redacted>
Signed-off-by: Dong Aisheng <aisheng.dong@nxp.com>
From: Kevin Hilman <khilman@baylibre.com> Date: 2018-11-15 01:01:08
"A.s. Dong" [off-list ref] writes:
After patch b96eea718bf6 ("pinctrl: fsl: add scu based pinctrl support"),
NO_PAD_CTL pads map are not skipped anymore which results in
a possible memory corruption. As we actually only need to create config
maps for SCU pads and MMIO pads which are not using the default config
(a.k.a IMX_NO_PAD_CTL), so let's add a proper check before creating
the config maps. And during MMIO pads parsing, we also need update the
list_p point as SCU case to ensure the pin data next parsed is correct.
Cc: Linus Walleij <redacted>
Fixes: b96eea718bf6 ("pinctrl: fsl: add scu based pinctrl support")
Reported-by: Martin Kaiser <redacted>
Suggested-by: Leonard Crestez <redacted>
Signed-off-by: Dong Aisheng <aisheng.dong@nxp.com>
After kernelCI found a similar failure, I verified that this patch gets
things booting again in today's linux-next.
Tested-by: Kevin Hilman <khilman@baylibre.com>
Kevin
On Mon, Nov 12, 2018 at 4:25 PM A.s. Dong [off-list ref] wrote:
After patch b96eea718bf6 ("pinctrl: fsl: add scu based pinctrl support"),
NO_PAD_CTL pads map are not skipped anymore which results in
a possible memory corruption. As we actually only need to create config
maps for SCU pads and MMIO pads which are not using the default config
(a.k.a IMX_NO_PAD_CTL), so let's add a proper check before creating
the config maps. And during MMIO pads parsing, we also need update the
list_p point as SCU case to ensure the pin data next parsed is correct.
Cc: Linus Walleij <redacted>
Fixes: b96eea718bf6 ("pinctrl: fsl: add scu based pinctrl support")
Reported-by: Martin Kaiser <redacted>
Suggested-by: Leonard Crestez <redacted>
Signed-off-by: Dong Aisheng <aisheng.dong@nxp.com>
Patch applied with all the test tags!
Yours,
Linus Walleij