linux_dsm_epyc7002/drivers/pinctrl
Yanjiang Jin 54a58185bf pinctrl: core: make sure strcmp() doesn't get a null parameter
Some drivers, for example, QCOM's qdf2xxx, set groups[gpio].name only
when gpio is valid, and leave invalid gpio names as null.
If we want to access the sys node "pinconf-groups",
pinctrl_get_group_selector() -> get_group_name() may return a null
pointer if group_selector is invalid, then the below Kernel panic
would happen since strcmp() uses this null pointer to do comparison.

 Unable to handle kernel NULL pointer dereference at ss 00000000
el:Internal error: Oops: 9600000[ 143.080279]
SMP
 CPU: 19 PID: 2493 Comm: read_all Tainted: G O
.aarch64 #1
 Hardware name: HXT Semiconductor HXT REP-2 System
 PC is at strcmp+0x18/0x154
 LR is at pinctrl_get_group_selector+0x6c/0xe8
 Process read_all (pid: 2493, stack limit =
 Call trace:
 Exception stack
  strcmp+0x18/0x154
  pin_config_group_get+0x64/0xd8
  pinconf_generic_dump_one+0xd8/0x1c0
  pinconf_generic_dump_pins+0x94/0xc8
  pinconf_groups_show+0xb4/0x104
  seq_read+0x178/0x464
  full_proxy_read+0x6c/0xac
  __vfs_read+0x58/0x178
  vfs_read+0x94/0x164
  SyS_read+0x60/0xc0
  __sys_trace_return+0x0/0x4
 --[ end trace]--
 Kernel panic - not syncing: Fatal exception

Signed-off-by: Yanjiang Jin <yanjiang.jin@hxt-semitech.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2018-10-01 13:46:13 +02:00
..
actions This is the bulk of pin control changes for v4.19: 2018-08-14 12:31:27 -07:00
aspeed pinctrl: remove unnecessary unlikely() 2018-08-31 11:29:12 +02:00
bcm pinctrl: nsp: Fix potential NULL dereference 2018-07-14 12:47:04 +02:00
berlin pinctrl: Convert to using %pOFn instead of device_node.name 2018-08-29 14:05:36 +02:00
cirrus This is the 4.19-rc6 release 2018-10-01 13:20:45 +02:00
freescale pinctrl: mxs: do not export mxs_pinctrl_probe 2018-09-20 15:45:14 -07:00
intel This is the 4.19-rc6 release 2018-10-01 13:20:45 +02:00
mediatek pinctrl: mediatek: mark dummy helpers as 'static inline' 2018-09-28 09:27:04 +02:00
meson pinctrl: Include <linux/gpio/driver.h> nothing else 2018-09-14 15:10:57 +02:00
mvebu pinctrl: Include <linux/gpio/driver.h> nothing else 2018-09-14 15:10:57 +02:00
nomadik pinctrl: Include <linux/gpio/driver.h> nothing else 2018-09-14 15:10:57 +02:00
nuvoton pinctrl: nuvoton: add NPCM7xx pinctrl and GPIO driver 2018-08-29 10:28:42 +02:00
pxa pinctrl: pxa: pxa2xx: add missing MODULE_DESCRIPTION/AUTHOR/LICENSE 2017-11-30 14:42:04 +01:00
qcom This is the 4.19-rc6 release 2018-10-01 13:20:45 +02:00
samsung pinctrl: Include <linux/gpio/driver.h> nothing else 2018-09-14 15:10:57 +02:00
sh-pfc pinctrl: sh-pfc: rcar: Rename automotive-only arrays to automotive 2018-09-28 09:49:15 +02:00
sirf pinctrl: Include <linux/gpio/driver.h> nothing else 2018-09-14 15:10:57 +02:00
spear pinctrl: Include <linux/gpio/driver.h> nothing else 2018-09-14 15:10:57 +02:00
sprd pinctrl: sprd: Move DT parsing before registering pinctrl device 2018-09-28 09:34:19 +02:00
stm32 pinctrl: Convert to using %pOFn instead of device_node.name 2018-08-29 14:05:36 +02:00
sunxi pinctrl: sunxi: fix 'pctrl->functions' allocation in sunxi_pinctrl_build_state 2018-09-21 09:17:27 -07:00
tegra pinctrl: tegra: do not export tegra_pinctrl_probe 2018-09-20 08:15:16 -07:00
ti pinctrl: Convert to using %pOFn instead of device_node.name 2018-08-29 14:05:36 +02:00
uniphier pinctrl: uniphier: drop meaningless pin from SD1 pin-mux of Pro4 2018-08-29 10:50:12 +02:00
vt8500 pinctrl: Include <linux/gpio/driver.h> nothing else 2018-09-14 15:10:57 +02:00
zte treewide: devm_kzalloc() -> devm_kcalloc() 2018-06-12 16:19:22 -07:00
core.c pinctrl: core: make sure strcmp() doesn't get a null parameter 2018-10-01 13:46:13 +02:00
core.h pinctrl: core: Remove broken remove_last group and pinmux functions 2018-07-17 10:49:49 +02:00
devicetree.c pinctrl: Support stopping deferred probe after initcalls 2018-07-10 17:22:35 +02:00
devicetree.h
Kconfig Merge branch 'ib-ingenic' into devel 2018-08-29 14:10:34 +02:00
Makefile pinctrl: nuvoton: add NPCM7xx pinctrl and GPIO driver 2018-08-29 10:28:42 +02:00
pinconf-generic.c pinctrl: Add skew-delay pin config and bindings 2017-11-08 13:49:45 +01:00
pinconf.c pinctrl: check ops->pin_config_set in pinconf_set_config() 2017-08-14 15:01:59 +02:00
pinconf.h pinctrl: move const qualifier before struct 2017-08-14 15:01:02 +02:00
pinctrl-amd.c This is the 4.19-rc6 release 2018-10-01 13:20:45 +02:00
pinctrl-amd.h pinctrl/amd: fix gpio irq level in debugfs 2018-07-29 22:20:15 +02:00
pinctrl-artpec6.c pinctrl: artpec-6: Add smaller groups for uarts 2018-03-01 17:04:09 +01:00
pinctrl-as3722.c pinctrl: Include <linux/gpio/driver.h> nothing else 2018-09-14 15:10:57 +02:00
pinctrl-at91-pio4.c pinctrl: at91-pio4: Get rid of legacy call 2018-09-14 12:49:19 +02:00
pinctrl-at91.c pinctrl: Include <linux/gpio/driver.h> nothing else 2018-09-14 15:10:57 +02:00
pinctrl-at91.h
pinctrl-axp209.c pinctrl: axp209: Fix NULL pointer dereference after allocation 2018-08-10 23:12:43 +02:00
pinctrl-coh901.c pinctrl: Include <linux/gpio/driver.h> nothing else 2018-09-14 15:10:57 +02:00
pinctrl-coh901.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
pinctrl-da850-pupd.c
pinctrl-digicolor.c pinctrl: Include <linux/gpio/driver.h> nothing else 2018-09-14 15:10:57 +02:00
pinctrl-falcon.c pinctrl: Include <linux/gpio/driver.h> nothing else 2018-09-14 15:10:57 +02:00
pinctrl-gemini.c pinctrl: gemini: Mask properly 2018-06-26 09:51:42 +02:00
pinctrl-ingenic.c This is the 4.19-rc6 release 2018-10-01 13:20:45 +02:00
pinctrl-lantiq.c pinctrl: Convert to using %pOFn instead of device_node.name 2018-08-29 14:05:36 +02:00
pinctrl-lantiq.h
pinctrl-lpc18xx.c pinctrl: lpc18xx: mark expected switch fall-throughs 2018-08-29 13:47:16 +02:00
pinctrl-max77620.c pinctrl: max77620: Use common error handling code in max77620_pinconf_set() 2017-11-08 13:49:57 +01:00
pinctrl-mcp23s08.c pinctrl: Include <linux/gpio/driver.h> nothing else 2018-09-14 15:10:57 +02:00
pinctrl-ocelot.c pinctrl: ocelot: add support for interrupt controller 2018-08-06 13:00:17 +02:00
pinctrl-oxnas.c gpio: Move irqdomain into struct gpio_irq_chip 2017-11-08 14:06:21 +01:00
pinctrl-palmas.c pinctrl: palmas: Delete an error message for a failed memory allocation in palmas_pinctrl_probe() 2018-01-03 08:46:49 +01:00
pinctrl-pic32.c gpio: Move irqdomain into struct gpio_irq_chip 2017-11-08 14:06:21 +01:00
pinctrl-pic32.h
pinctrl-pistachio.c pinctrl: Include <linux/gpio/driver.h> nothing else 2018-09-14 15:10:57 +02:00
pinctrl-rk805.c pinctrl: Add pinctrl driver for the RK805 PMIC 2017-08-21 08:54:46 +01:00
pinctrl-rockchip.c pinctrl: Include <linux/gpio/driver.h> nothing else 2018-09-14 15:10:57 +02:00
pinctrl-rza1.c pinctrl: sh-pfc: Updates for v4.20 (take two) 2018-10-01 13:21:58 +02:00
pinctrl-single.c pinctrl: Convert to using %pOFn instead of device_node.name 2018-08-29 14:05:36 +02:00
pinctrl-st.c pinctrl: Convert to using %pOFn instead of device_node.name 2018-08-29 14:05:36 +02:00
pinctrl-sx150x.c pinctrl: sx150x: Add a static gpio/pinctrl pin range mapping 2018-01-18 11:04:47 +01:00
pinctrl-tb10x.c pinctrl: tb10x: constify pinconf_ops, pinctrl_ops, and pinmux_ops structures 2017-08-22 14:41:40 +02:00
pinctrl-u300.c headers: separate linux/mod_devicetable.h from linux/platform_device.h 2018-07-07 17:52:26 +02:00
pinctrl-utils.c pinctrl: utils: Delete an error message for a failed memory allocation in pinctrl_utils_add_map_configs() 2018-01-03 08:46:53 +01:00
pinctrl-utils.h
pinctrl-xway.c treewide: devm_kzalloc() -> devm_kcalloc() 2018-06-12 16:19:22 -07:00
pinctrl-zynq.c pinctrl: zynq: Fix warnings in the driver 2017-08-14 15:01:01 +02:00
pinmux.c pinctrl: pinmux: Return selector to the pinctrl driver 2018-07-17 10:48:47 +02:00
pinmux.h pinctrl: core: Remove broken remove_last group and pinmux functions 2018-07-17 10:49:49 +02:00