2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-16 09:13:55 +08:00
linux-next/drivers/phy/renesas
Yoshihiro Shimoda 4bd5ead82d phy: renesas: rcar-gen3-usb2: Fix sysfs interface of "role"
Since the role_store() uses strncmp(), it's possible to refer
out-of-memory if the sysfs data size is smaller than strlen("host").
This patch fixes it by using sysfs_streq() instead of strncmp().

Reported-by: Pavel Machek <pavel@denx.de>
Fixes: 9bb86777fb ("phy: rcar-gen3-usb2: add sysfs for usb role swap")
Cc: <stable@vger.kernel.org> # v4.10+
Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Acked-by: Pavel Machek <pavel@denx.de>
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
2019-10-23 13:20:37 +05:30
..
Kconfig phy: rcar-gen3-usb2: Add support for r8a77470 2019-04-17 14:13:11 +05:30
Makefile phy: renesas: convert to SPDX identifiers 2018-09-26 13:09:41 +05:30
phy-rcar-gen2.c phy: renesas: rcar-gen2: Fix memory leak at error paths 2019-06-12 15:35:44 +05:30
phy-rcar-gen3-pcie.c phy: Renesas R-Car gen3 PCIe PHY driver 2018-07-10 13:45:11 +05:30
phy-rcar-gen3-usb2.c phy: renesas: rcar-gen3-usb2: Fix sysfs interface of "role" 2019-10-23 13:20:37 +05:30
phy-rcar-gen3-usb3.c phy: renesas: use SPDX identifier for Renesas drivers 2018-09-10 14:28:07 +05:30