diff options
author | Julian Wiedmann <[email protected]> | 2018-11-28 16:20:50 +0100 |
---|---|---|
committer | David S. Miller <[email protected]> | 2018-11-28 11:16:54 -0800 |
commit | 9a764c1e59684c0358e16ccaafd870629f2cfe67 (patch) | |
tree | 2af9ac65e1285e7883a3b3d2a7877c416fed00d5 /tools/perf/scripts/python/export-to-postgresql.py | |
parent | e9d8faf93d273374dc6ae073a35e2fbcbcd97305 (diff) |
s390/qeth: fix length check in SNMP processing
The response for a SNMP request can consist of multiple parts, which
the cmd callback stages into a kernel buffer until all parts have been
received. If the callback detects that the staging buffer provides
insufficient space, it bails out with error.
This processing is buggy for the first part of the response - while it
initially checks for a length of 'data_len', it later copies an
additional amount of 'offsetof(struct qeth_snmp_cmd, data)' bytes.
Fix the calculation of 'data_len' for the first part of the response.
This also nicely cleans up the memcpy code.
Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Signed-off-by: Julian Wiedmann <[email protected]>
Reviewed-by: Ursula Braun <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions