linux/drivers/s390
Julian Wiedmann 6ae0dc6c06 s390/qeth: fix length check in SNMP processing
[ Upstream commit 9a764c1e59 ]

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: 1da177e4c3 ("Linux-2.6.12-rc2")
Signed-off-by: Julian Wiedmann <jwi@linux.ibm.com>
Reviewed-by: Ursula Braun <ubraun@linux.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-12-13 09:21:26 +01:00
..
block s390/dasd: fix hanging offline processing due to canceled worker 2018-09-15 09:40:39 +02:00
char s390: introduce execute-trampolines for branches 2018-04-29 07:50:03 +02:00
cio s390/qdio: reset old sbal_state flags 2018-09-05 09:18:40 +02:00
crypto
net s390/qeth: fix length check in SNMP processing 2018-12-13 09:21:26 +01:00
scsi scsi: zfcp: fix missing REC trigger trace on enqueue without ERP thread 2018-07-03 11:21:31 +02:00
virtio
Makefile