From owner-svn-src-stable@freebsd.org Fri Apr 29 11:31:29 2016 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2320CB2031B; Fri, 29 Apr 2016 11:31:29 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E8BEE177C; Fri, 29 Apr 2016 11:31:28 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u3TBVSRb046124; Fri, 29 Apr 2016 11:31:28 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u3TBVSud046123; Fri, 29 Apr 2016 11:31:28 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201604291131.u3TBVSud046123@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Fri, 29 Apr 2016 11:31:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r298780 - stable/9/sys/ofed/drivers/infiniband/ulp/ipoib X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Apr 2016 11:31:29 -0000 Author: hselasky Date: Fri Apr 29 11:31:27 2016 New Revision: 298780 URL: https://svnweb.freebsd.org/changeset/base/298780 Log: MFC r298458: Add missing set of the current VNET when inputting IP packets in IPoIB. This fixes a kernel panic when using IPoIB with VIMAGE and infiniband. PR: 208957 Sponsored by: Mellanox Technologies Tested by: Justin Clift Modified: stable/9/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_cm.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_cm.c ============================================================================== --- stable/9/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_cm.c Fri Apr 29 11:29:52 2016 (r298779) +++ stable/9/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_cm.c Fri Apr 29 11:31:27 2016 (r298780) @@ -481,6 +481,8 @@ void ipoib_cm_handle_rx_wc(struct ipoib_ int has_srq; u_short proto; + CURVNET_SET_QUIET(dev->if_vnet); + ipoib_dbg_data(priv, "cm recv completion: id %d, status: %d\n", wr_id, wc->status); @@ -496,7 +498,7 @@ void ipoib_cm_handle_rx_wc(struct ipoib_ } else ipoib_warn(priv, "cm recv completion event with wrid %d (> %d)\n", wr_id, ipoib_recvq_size); - return; + goto done; } p = wc->qp->qp_context; @@ -520,7 +522,7 @@ void ipoib_cm_handle_rx_wc(struct ipoib_ queue_work(ipoib_workqueue, &priv->cm.rx_reap_task); spin_unlock(&priv->lock); } - return; + goto done; } } @@ -579,6 +581,9 @@ repost: "for buf %d\n", wr_id); } } +done: + CURVNET_RESTORE(); + return; } static inline int post_send(struct ipoib_dev_priv *priv,