dragonheart_kernel_oneplus_.../drivers/phy/renesas
Yoshihiro Shimoda 96dd9ce3d0 phy: renesas: rcar-gen3-usb2: Fix sysfs interface of "role"
[ Upstream commit 4bd5ead82d4b877ebe41daf95f28cda53205b039 ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2019-12-17 20:39:52 +01:00
..
Kconfig
Makefile
phy-rcar-gen2.c
phy-rcar-gen3-usb2.c phy: renesas: rcar-gen3-usb2: Fix sysfs interface of "role" 2019-12-17 20:39:52 +01:00
phy-rcar-gen3-usb3.c