From patchwork Mon Jul 21 10:54:44 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: frank.blaschka@de.ibm.com X-Patchwork-Id: 372032 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 791E2140110 for ; Mon, 21 Jul 2014 20:55:18 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754679AbaGUKzN (ORCPT ); Mon, 21 Jul 2014 06:55:13 -0400 Received: from e06smtp17.uk.ibm.com ([195.75.94.113]:39628 "EHLO e06smtp17.uk.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754634AbaGUKzJ (ORCPT ); Mon, 21 Jul 2014 06:55:09 -0400 Received: from /spool/local by e06smtp17.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 21 Jul 2014 11:55:07 +0100 Received: from d06dlp02.portsmouth.uk.ibm.com (9.149.20.14) by e06smtp17.uk.ibm.com (192.168.101.147) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Mon, 21 Jul 2014 11:55:04 +0100 Received: from b06cxnps3075.portsmouth.uk.ibm.com (d06relay10.portsmouth.uk.ibm.com [9.149.109.195]) by d06dlp02.portsmouth.uk.ibm.com (Postfix) with ESMTP id 255612190041; Mon, 21 Jul 2014 11:54:50 +0100 (BST) Received: from d06av02.portsmouth.uk.ibm.com (d06av02.portsmouth.uk.ibm.com [9.149.37.228]) by b06cxnps3075.portsmouth.uk.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id s6LAt4rU31260846; Mon, 21 Jul 2014 10:55:04 GMT Received: from d06av02.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by d06av02.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id s6LAt3G2030873; Mon, 21 Jul 2014 04:55:04 -0600 Received: from tuxmaker.boeblingen.de.ibm.com (tuxmaker.boeblingen.de.ibm.com [9.152.85.9]) by d06av02.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with ESMTP id s6LAt2Kc030856; Mon, 21 Jul 2014 04:55:02 -0600 Received: by tuxmaker.boeblingen.de.ibm.com (Postfix, from userid 24631) id A8874122422D; Mon, 21 Jul 2014 12:55:02 +0200 (CEST) Message-Id: <20140721105502.589636932@de.ibm.com> User-Agent: quilt/0.61-1 Date: Mon, 21 Jul 2014 12:54:44 +0200 From: frank.blaschka@de.ibm.com To: davem@davemloft.net Cc: netdev@vger.kernel.org, linux-s390@vger.kernel.org, Ursula Braun , Philipp Hachtmann Subject: [patch 2/2] af_iucv: avoid path quiesce of severed path in shutdown() References: <20140721105442.533889716@de.ibm.com> MIME-Version: 1.0 Content-Disposition: inline; filename=601-af_iucv-path-quiesce.diff X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 14072110-0542-0000-0000-0000001B39A7 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Ursula Braun 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 Signed-off-by: Frank Blaschka Reported-by: Philipp Hachtmann --- net/iucv/af_iucv.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html --- a/net/iucv/af_iucv.c +++ b/net/iucv/af_iucv.c @@ -1542,7 +1542,8 @@ static int iucv_sock_shutdown(struct soc 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;