Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

netiucv: improve state checking in conn_action_txdone

state checking in conn_action_txdone() is inconsistent.
This patch makes it consistent and issues a trace message
if an unexpected state is detected for the netiucv device.

Signed-off-by: Ursula Braun <ursula.braun@de.ibm.com>
Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Ursula Braun and committed by
David S. Miller
d239ae33 d207cf4c

+6 -2
+6 -2
drivers/s390/net/netiucv.c
··· 739 739 740 740 IUCV_DBF_TEXT(trace, 4, __func__); 741 741 742 - if (conn && conn->netdev) 743 - privptr = netdev_priv(conn->netdev); 742 + if (!conn || !conn->netdev) { 743 + IUCV_DBF_TEXT(data, 2, 744 + "Send confirmation for unlinked connection\n"); 745 + return; 746 + } 747 + privptr = netdev_priv(conn->netdev); 744 748 conn->prof.tx_pending--; 745 749 if (single_flag) { 746 750 if ((skb = skb_dequeue(&conn->commit_queue))) {