linux-stable/drivers/s390
Alexandra Winter a1b4ed4125 s390/qeth: Fix potential loss of L3-IP@ in case of network issues
commit 2fe8a23643 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 09:25:15 +01:00
..
block s390/scm: fix virtual vs physical address confusion 2024-01-20 11:51:44 +01:00
char more s390 updates for 6.6 merge window 2023-09-07 10:52:13 -07:00
cio s390/cio: fix a memleak in css_alloc_subchannel 2023-10-16 13:03:05 +02:00
crypto s390/vfio-ap: fix sysfs status attribute for AP queue devices 2024-02-05 20:14:17 +00:00
net s390/qeth: Fix potential loss of L3-IP@ in case of network issues 2024-02-23 09:25:15 +01:00
scsi scsi: zfcp: Fix a double put in zfcp_port_enqueue() 2023-09-27 11:31:20 -04:00
virtio s390/airq: remove lsi_mask from airq_struct 2023-08-30 11:03:28 +02:00
Makefile