diff options
author | Fei Yang <fei.yang@intel.com> | 2019-06-12 15:13:26 -0700 |
---|---|---|
committer | Felipe Balbi <felipe.balbi@linux.intel.com> | 2019-06-18 11:58:28 +0300 |
commit | 4833a94eb383f5b22775077ff92ddaae90440921 (patch) | |
tree | 80eec2a8951c6983fae7c04dbb5518423f3a2f2d /tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/EventClass.py | |
parent | c846b03ff767149d75d4d8dca6d3d4945a21074a (diff) |
usb: gadget: f_fs: data_len used before properly set
The following line of code in function ffs_epfile_io is trying to set
flag io_data->use_sg in case buffer required is larger than one page.
io_data->use_sg = gadget->sg_supported && data_len > PAGE_SIZE;
However at this point of time the variable data_len has not been set
to the proper buffer size yet. The consequence is that io_data->use_sg
is always set regardless what buffer size really is, because the condition
(data_len > PAGE_SIZE) is effectively an unsigned comparison between
-EINVAL and PAGE_SIZE which would always result in TRUE.
Fixes: 772a7a724f69 ("usb: gadget: f_fs: Allow scatter-gather buffers")
Signed-off-by: Fei Yang <fei.yang@intel.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Diffstat (limited to 'tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/EventClass.py')
0 files changed, 0 insertions, 0 deletions