summaryrefslogtreecommitdiff
path: root/fs/btrfs
diff options
context:
space:
mode:
authorYoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>2019-10-07 10:55:10 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-12-17 22:34:45 +0300
commit80c291c11f1cdfead1ff75d1276a2d8f5067f8a6 (patch)
treec0ad9ac9d5004e96e4ba363dbefe5f96dff9abfb /fs/btrfs
parentc6f58dcdbacbbd56fbec50deae8dc77937a831c7 (diff)
downloadlinux-80c291c11f1cdfead1ff75d1276a2d8f5067f8a6.tar.xz
phy: renesas: rcar-gen3-usb2: Fix sysfs interface of "role"
commit 4bd5ead82d4b877ebe41daf95f28cda53205b039 upstream. 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: 9bb86777fb71 ("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: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs/btrfs')
0 files changed, 0 insertions, 0 deletions