android_kernel_xiaomi_sm8450/drivers/s390/net
Alexandra Winter 2e9506c9e0 s390/qeth: Fix potential loss of L3-IP@ in case of network issues
commit 2fe8a236436fe40d8d26a1af8d150fc80f04ee1a upstream.

Symptom:
In case of a bad cable connection (e.g. dirty optics) a fast sequence of
network DOWN-UP-DOWN-UP could happen. UP triggers recovery of the qeth
interface. In case of a second DOWN while recovery is still ongoing, it
can happen that the IP@ of a Layer3 qeth interface is lost and will not
be recovered by the second UP.

Problem:
When registration of IP addresses with Layer 3 qeth devices fails, (e.g.
because of bad address format) the respective IP address is deleted from
its hash-table in the driver. If registration fails because of a ENETDOWN
condition, the address should stay in the hashtable, so a subsequent
recovery can restore it.

3caa4af834 ("qeth: keep ip-address after LAN_OFFLINE failure")
fixes this for registration failures during normal operation, but not
during recovery.

Solution:
Keep L3-IP address in case of ENETDOWN in qeth_l3_recover_ip(). For
consistency with qeth_l3_add_ip() we also keep it in case of EADDRINUSE,
i.e. for some reason the card already/still has this address registered.

Fixes: 4a71df5004 ("qeth: new qeth device driver")
Cc: stable@vger.kernel.org
Signed-off-by: Alexandra Winter <wintera@linux.ibm.com>
Link: https://lore.kernel.org/r/20240206085849.2902775-1-wintera@linux.ibm.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-02-23 08:42:29 +01:00
..
ctcm_dbug.c
ctcm_dbug.h
ctcm_fsms.c
ctcm_fsms.h
ctcm_main.c s390/ctcm: Fix return type of ctc{mp,}m_tx() 2023-01-14 10:16:16 +01:00
ctcm_main.h
ctcm_mpc.c
ctcm_mpc.h
ctcm_sysfs.c
fsm.c
fsm.h
ism_drv.c
ism.h
Kconfig
lcs.c s390/lcs: Fix return type of lcs_start_xmit() 2023-01-14 10:16:17 +01:00
lcs.h
Makefile
netiucv.c s390/netiucv: Fix return type of netiucv_tx() 2023-01-14 10:16:17 +01:00
qeth_core_main.c s390/qeth: Don't call dev_close/dev_open (DOWN/UP) 2023-08-11 11:57:50 +02:00
qeth_core_mpc.c
qeth_core_mpc.h
qeth_core_sys.c
qeth_core.h s390/qeth: Don't call dev_close/dev_open (DOWN/UP) 2023-08-11 11:57:50 +02:00
qeth_ethtool.c
qeth_l2_main.c s390/qeth: Don't call dev_close/dev_open (DOWN/UP) 2023-08-11 11:57:50 +02:00
qeth_l2_sys.c
qeth_l2.h
qeth_l3_main.c s390/qeth: Fix potential loss of L3-IP@ in case of network issues 2024-02-23 08:42:29 +01:00
qeth_l3_sys.c s390/qeth: Fix vipa deletion 2023-07-27 08:44:10 +02:00
qeth_l3.h
smsgiucv_app.c
smsgiucv.c
smsgiucv.h