diff options
| author | Yoshihiro Shimoda <[email protected]> | 2019-10-07 16:55:10 +0900 |
|---|---|---|
| committer | Kishon Vijay Abraham I <[email protected]> | 2019-10-23 13:20:37 +0530 |
| commit | 4bd5ead82d4b877ebe41daf95f28cda53205b039 (patch) | |
| tree | 72a5000f8cb392f354387e6301dac5c819bd05a0 /tools/perf/scripts/python/export-to-postgresql.py | |
| parent | a8a24429dd1d799f1c6737779af88c1d39290a77 (diff) | |
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 <[email protected]>
Fixes: 9bb86777fb71 ("phy: rcar-gen3-usb2: add sysfs for usb role swap")
Cc: <[email protected]> # v4.10+
Signed-off-by: Yoshihiro Shimoda <[email protected]>
Reviewed-by: Geert Uytterhoeven <[email protected]>
Acked-by: Pavel Machek <[email protected]>
Signed-off-by: Kishon Vijay Abraham I <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions