Skip to content

Commit

Permalink
af_iucv: avoid path quiesce of severed path in shutdown()
Browse files Browse the repository at this point in the history
An af_iucv stress test showed -EPIPE results for sendmsg()
calls. They are caused by quiescing a path even though it has
been already severed by peer. For IUCV transport shutdown()
consists of 2 steps:
(1) sending the shutdown message to peer
(2) quiescing the iucv path
If the iucv path between these 2 steps is severed due to peer
closing the path, the quiesce step is no longer needed.

Signed-off-by: Ursula Braun <ursula.braun@de.ibm.com>
Signed-off-by: Frank Blaschka <blaschka@linux.vnet.ibm.com>
Reported-by: Philipp Hachtmann <phacht@linux.vnet.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Ursula Braun authored and David S. Miller committed Jul 22, 2014
1 parent 45cbb2e commit 1042cab
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion net/iucv/af_iucv.c
Original file line number Diff line number Diff line change
Expand Up @@ -1542,7 +1542,8 @@ static int iucv_sock_shutdown(struct socket *sock, int how)

sk->sk_shutdown |= how;
if (how == RCV_SHUTDOWN || how == SHUTDOWN_MASK) {
if (iucv->transport == AF_IUCV_TRANS_IUCV) {
if ((iucv->transport == AF_IUCV_TRANS_IUCV) &&
iucv->path) {
err = pr_iucv->path_quiesce(iucv->path, NULL);
if (err)
err = -ENOTCONN;
Expand Down

0 comments on commit 1042cab

Please sign in to comment.