linux-stable/drivers/s390
Alexandra Winter 3bc35da667 s390/qeth: Fix potential loss of L3-IP@ in case of network issues
[ Upstream commit 2fe8a23643 ]

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: Sasha Levin <sashal@kernel.org>
2024-03-01 13:13:34 +01:00
..
block s390/scm: fix virtual vs physical address confusion 2024-01-25 14:34:20 -08:00
char s390/zcore: fix race when reading from hardware system area 2022-08-25 11:18:05 +02:00
cio s390/cio: unregister device when the only path is gone 2023-06-28 10:18:41 +02:00
crypto s390/zcrypt: don't leak memory if dev_set_name() fails 2023-09-23 10:59:59 +02:00
net s390/qeth: Fix potential loss of L3-IP@ in case of network issues 2024-03-01 13:13:34 +01:00
scsi scsi: zfcp: Fix a double put in zfcp_port_enqueue() 2023-10-10 21:46:42 +02:00
virtio virtio/s390: implement virtio-ccw revision 2 correctly 2021-03-04 10:26:50 +01:00
Makefile