WSL2-Linux-Kernel/drivers/s390/net
Julian Wiedmann 9a764c1e59 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: 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>
2018-11-28 11:16:54 -08:00
..
Kconfig
Makefile
ctcm_dbug.c
ctcm_dbug.h
ctcm_fsms.c
ctcm_fsms.h
ctcm_main.c
ctcm_main.h
ctcm_mpc.c
ctcm_mpc.h
ctcm_sysfs.c
fsm.c
fsm.h
ism.h
ism_drv.c s390/ism: clear dmbe_mask bit before SMC IRQ handling 2018-11-14 14:21:20 -08:00
lcs.c
lcs.h
netiucv.c
qeth_core.h s390/qeth: sanitize ARP requests 2018-11-03 10:44:06 -07:00
qeth_core_main.c s390/qeth: fix length check in SNMP processing 2018-11-28 11:16:54 -08:00
qeth_core_mpc.c
qeth_core_mpc.h s390/qeth: report 25Gbit link speed 2018-11-03 10:44:06 -07:00
qeth_core_sys.c
qeth_l2.h
qeth_l2_main.c s390/qeth: fix initial operstate 2018-11-03 10:44:05 -07:00
qeth_l2_sys.c
qeth_l3.h
qeth_l3_main.c s390/qeth: sanitize ARP requests 2018-11-03 10:44:06 -07:00
qeth_l3_sys.c
smsgiucv.c
smsgiucv.h
smsgiucv_app.c