From patchwork Wed Dec 13 10:25:19 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yuval Shaia X-Patchwork-Id: 10109633 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id C6A37602C2 for ; Wed, 13 Dec 2017 10:25:48 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B7A6D28E2D for ; Wed, 13 Dec 2017 10:25:48 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AC2DD28E33; Wed, 13 Dec 2017 10:25:48 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 948D128E2D for ; Wed, 13 Dec 2017 10:25:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751870AbdLMKZq (ORCPT ); Wed, 13 Dec 2017 05:25:46 -0500 Received: from userp2120.oracle.com ([156.151.31.85]:42402 "EHLO userp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751529AbdLMKZp (ORCPT ); Wed, 13 Dec 2017 05:25:45 -0500 Received: from pps.filterd (userp2120.oracle.com [127.0.0.1]) by userp2120.oracle.com (8.16.0.21/8.16.0.21) with SMTP id vBDAMfoN150039; Wed, 13 Dec 2017 10:25:38 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : subject : date : message-id; s=corp-2017-10-26; bh=+nWXt7+xnHVjsCLBSOj+NCWE+2F2sSuFMNuj80SU2w8=; b=jOPLgT0rbS9hb+A7BBdQ4rTu3iIfb9+WTX7OMJ/mi7X0WrpKnYaYg3ohh2zhAZb3kY0i N+38vc/PmEkZou+zH3HIF4WbjGVKxH1h6EWYVXSiggbPtcqSvi67GqlTyOr4GIWilrMN OicbxXU0LVhW1akDvddUJF6+c12+XAUrucC6NiSKMd8UgttTmsYS9SW3MpTDrKe2cO+7 pR+n59kv/PoCdFewBPeA6kNk/EuS9jU0KanWWdnfO71EyXiIpEkoQUgd3Vy9SxWnk/LP Ze+33NjYERSVmknUqaLX3pbL/7jVBO3oFochGJw3kd/FeHRWJzptfCFJx1h75yXWwsGi tA== Received: from aserv0022.oracle.com (aserv0022.oracle.com [141.146.126.234]) by userp2120.oracle.com with ESMTP id 2eu2cbg0m0-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 13 Dec 2017 10:25:38 +0000 Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by aserv0022.oracle.com (8.14.4/8.14.4) with ESMTP id vBDAPbYi002392 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 13 Dec 2017 10:25:37 GMT Received: from abhmp0001.oracle.com (abhmp0001.oracle.com [141.146.116.7]) by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id vBDAPaWR009743; Wed, 13 Dec 2017 10:25:36 GMT Received: from localhost.localdomain (/77.138.186.148) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Wed, 13 Dec 2017 02:25:36 -0800 From: Yuval Shaia To: dledford@redhat.com, jgg@ziepe.ca, leonro@mellanox.com, erezsh@mellanox.com, yuval.shaia@oracle.com, valex@mellanox.com, ferasda@mellanox.com, yanjun.zhu@oracle.com, dasaratharaman.chandramouli@intel.com, santosh.shilimkar@oracle.com, ajaykumar.hotchandani@oracle.com, linux-rdma@vger.kernel.org Subject: [PATCH] IB/ipoib: Restore MM behavior in case of tx_ring allocation failure Date: Wed, 13 Dec 2017 12:25:19 +0200 Message-Id: <20171213102519.4929-1-yuval.shaia@oracle.com> X-Mailer: git-send-email 2.14.3 X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=8743 signatures=668646 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=928 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1711220000 definitions=main-1712130149 Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP memalloc_noio_save modifies the behavior of MM, we must restore it after we are done. Fixes: d83187dda9b9 IB/IPoIB: Convert IPoIB to memalloc_noio_* calls Signed-off-by: Yuval Shaia --- drivers/infiniband/ulp/ipoib/ipoib_cm.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/infiniband/ulp/ipoib/ipoib_cm.c b/drivers/infiniband/ulp/ipoib/ipoib_cm.c index 87f4bd99cdf7..2c13123bfd69 100644 --- a/drivers/infiniband/ulp/ipoib/ipoib_cm.c +++ b/drivers/infiniband/ulp/ipoib/ipoib_cm.c @@ -1145,6 +1145,7 @@ static int ipoib_cm_tx_init(struct ipoib_cm_tx *p, u32 qpn, noio_flag = memalloc_noio_save(); p->tx_ring = vzalloc(ipoib_sendq_size * sizeof(*p->tx_ring)); if (!p->tx_ring) { + memalloc_noio_restore(noio_flag); ret = -ENOMEM; goto err_tx; }