summaryrefslogtreecommitdiffstats
path: root/net/core/net-sysfs.h
diff options
context:
space:
mode:
authorYoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>2019-07-31 19:15:43 +0900
committerFelipe Balbi <felipe.balbi@linux.intel.com>2019-08-12 08:55:24 +0300
commit5dac665cf403967bb79a7aeb8c182a621fe617ff (patch)
treeebcd7dd86e25a663ac9264e4aa1edd0135b372a4 /net/core/net-sysfs.h
parentd45331b00ddb179e291766617259261c112db872 (diff)
downloadlinux-5dac665cf403967bb79a7aeb8c182a621fe617ff.tar.bz2
usb: gadget: udc: renesas_usb3: 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(). Fixes: cc995c9ec118 ("usb: gadget: udc: renesas_usb3: add support for usb role swap") Cc: <stable@vger.kernel.org> # v4.12+ Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Diffstat (limited to 'net/core/net-sysfs.h')
0 files changed, 0 insertions, 0 deletions