Date: Thu, 21 Jan 2016 00:42:48 +0000 (UTC) From: Navdeep Parhar <np@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r294474 - head/sys/dev/cxgbe/iw_cxgbe Message-ID: <201601210042.u0L0gmAK091983@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: np Date: Thu Jan 21 00:42:48 2016 New Revision: 294474 URL: https://svnweb.freebsd.org/changeset/base/294474 Log: iw_cxgbe: fix a couple of problems int the RDMA_TERMINATE handler. a) Look for the CPL in the payload buffer instead of the descriptor. b) Retrieve the socket associated with the tid with the inpcb lock held. Submitted by: Krishnamraju Eraparaju @ Chelsio Modified: head/sys/dev/cxgbe/iw_cxgbe/cm.c Modified: head/sys/dev/cxgbe/iw_cxgbe/cm.c ============================================================================== --- head/sys/dev/cxgbe/iw_cxgbe/cm.c Wed Jan 20 23:55:39 2016 (r294473) +++ head/sys/dev/cxgbe/iw_cxgbe/cm.c Thu Jan 21 00:42:48 2016 (r294474) @@ -2365,15 +2365,18 @@ static int fw6_cqe_handler(struct adapte static int terminate(struct sge_iq *iq, const struct rss_header *rss, struct mbuf *m) { - struct adapter *sc = iq->adapter; - - const struct cpl_rdma_terminate *rpl = (const void *)(rss + 1); - unsigned int tid = GET_TID(rpl); + const struct cpl_rdma_terminate *cpl = mtod(m, const void *); + unsigned int tid = GET_TID(cpl); struct c4iw_qp_attributes attrs; struct toepcb *toep = lookup_tid(sc, tid); - struct socket *so = inp_inpcbtosocket(toep->inp); - struct c4iw_ep *ep = so->so_rcv.sb_upcallarg; + struct socket *so; + struct c4iw_ep *ep; + + INP_WLOCK(toep->inp); + so = inp_inpcbtosocket(toep->inp); + ep = so->so_rcv.sb_upcallarg; + INP_WUNLOCK(toep->inp); CTR2(KTR_IW_CXGBE, "%s:tB %p %d", __func__, ep);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201601210042.u0L0gmAK091983>