[lkml]   [2019]   [Aug]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH] phy: renesas: rcar-gen3-usb2: Fix sysfs interface of "role"
On Wed 2019-07-31 18:01:29, Yoshihiro Shimoda wrote:
> 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 <>
> Fixes: 9bb86777fb71 ("phy: rcar-gen3-usb2: add sysfs for usb role swap")
> Cc: <> # v4.10+
> Signed-off-by: Yoshihiro Shimoda <>

Acked-by: Pavel Machek <>

DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
[unhandled content-type:application/pgp-signature]
 \ /
  Last update: 2019-08-14 10:21    [W:0.050 / U:15.004 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site