Date: Sat, 25 Mar 2017 02:28:21 +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: r315922 - head/sys/dev/cxgbe/iw_cxgbe Message-ID: <201703250228.v2P2SLMv030355@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: np Date: Sat Mar 25 02:28:21 2017 New Revision: 315922 URL: https://svnweb.freebsd.org/changeset/base/315922 Log: cxgbe/iw_cxgbe: allocations that use GFP_KERNEL (which is M_WAITOK on FreeBSD) cannot fail. MFC after: 3 days 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 Sat Mar 25 01:45:04 2017 (r315921) +++ head/sys/dev/cxgbe/iw_cxgbe/cm.c Sat Mar 25 02:28:21 2017 (r315922) @@ -2135,14 +2135,6 @@ int c4iw_connect(struct iw_cm_id *cm_id, goto out; } ep = alloc_ep(sizeof(*ep), GFP_KERNEL); - - if (!ep) { - - CTR2(KTR_IW_CXGBE, "%s:cc2 %p", __func__, cm_id); - printk(KERN_ERR MOD "%s - cannot alloc ep.\n", __func__); - err = -ENOMEM; - goto out; - } init_timer(&ep->timer); ep->plen = conn_param->private_data_len; @@ -2229,21 +2221,11 @@ out: int c4iw_create_listen_ep(struct iw_cm_id *cm_id, int backlog) { - int rc; struct c4iw_dev *dev = to_c4iw_dev(cm_id->device); struct c4iw_listen_ep *ep; struct socket *so = cm_id->so; ep = alloc_ep(sizeof(*ep), GFP_KERNEL); - CTR5(KTR_IW_CXGBE, "%s: cm_id %p, lso %p, ep %p, inp %p", __func__, - cm_id, so, ep, so->so_pcb); - if (ep == NULL) { - log(LOG_ERR, "%s: failed to alloc memory for endpoint\n", - __func__); - rc = ENOMEM; - goto failed; - } - ep->com.cm_id = cm_id; ref_cm_id(&ep->com); ep->com.dev = dev; @@ -2255,10 +2237,6 @@ c4iw_create_listen_ep(struct iw_cm_id *c cm_id->provider_data = ep; return (0); - -failed: - CTR3(KTR_IW_CXGBE, "%s: cm_id %p, FAILED (%d)", __func__, cm_id, rc); - return (-rc); } void
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201703250228.v2P2SLMv030355>