From owner-p4-projects@FreeBSD.ORG Thu Feb 7 05:31:01 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 3795516A46B; Thu, 7 Feb 2008 05:31:01 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F109516A41B for ; Thu, 7 Feb 2008 05:31:00 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id D032413C448 for ; Thu, 7 Feb 2008 05:31:00 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m175V0oO015875 for ; Thu, 7 Feb 2008 05:31:00 GMT (envelope-from kmacy@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m175V0UL015872 for perforce@freebsd.org; Thu, 7 Feb 2008 05:31:00 GMT (envelope-from kmacy@freebsd.org) Date: Thu, 7 Feb 2008 05:31:00 GMT Message-Id: <200802070531.m175V0UL015872@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to kmacy@freebsd.org using -f From: Kip Macy To: Perforce Change Reviews Cc: Subject: PERFORCE change 134960 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Feb 2008 05:31:01 -0000 http://perforce.freebsd.org/chv.cgi?CH=134960 Change 134960 by kmacy@kmacy:storage:toehead on 2008/02/07 05:30:54 don't unconditionally reference uio as it may not be set for kernel sockets Affected files ... .. //depot/projects/toehead/sys/dev/cxgb/ulp/tom/cxgb_cpl_socket.c#17 edit Differences ... ==== //depot/projects/toehead/sys/dev/cxgb/ulp/tom/cxgb_cpl_socket.c#17 (text+ko) ==== @@ -517,7 +517,7 @@ zcopy_thres = TOM_TUNABLE(tdev, zcopy_sosend_partial_thres); zcopy_enabled = TOM_TUNABLE(tdev, zcopy_sosend_enabled); - if ((uio->uio_resid > zcopy_thres) && + if (uio && (uio->uio_resid > zcopy_thres) && (uio->uio_iovcnt < TMP_IOV_MAX) && ((so->so_state & SS_NBIO) == 0) && zcopy_enabled) { rv = t3_sosend(so, uio); @@ -924,7 +924,7 @@ * */ - if ((tp->t_flags & TF_TOE) && ((flags & (MSG_WAITALL|MSG_OOB|MSG_PEEK|MSG_DONTWAIT)) == 0) + if ((tp->t_flags & TF_TOE) && uio && ((flags & (MSG_WAITALL|MSG_OOB|MSG_PEEK|MSG_DONTWAIT)) == 0) && (uio->uio_iovcnt == 1) && (mp0 == NULL)) { tdev = TOE_DEV(so); zcopy_thres = TOM_TUNABLE(tdev, ddp_thres); @@ -938,7 +938,7 @@ else printf("returned EAGAIN\n"); } - } else if (tp->t_flags & TF_TOE) + } else if ((tp->t_flags & TF_TOE) && uio) printf("skipping t3_soreceive flags=0x%x iovcnt=%d mp0=%p sb_state=0x%x\n", flags, uio->uio_iovcnt, mp0, so->so_rcv.sb_state); return pru_soreceive(so, psa, uio, mp0, controlp, flagsp);