Date: Thu, 7 Feb 2008 05:34:04 GMT From: Kip Macy <kmacy@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 134961 for review Message-ID: <200802070534.m175Y4Jc016080@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=134961 Change 134961 by kmacy@kmacy:entropy:iwarp on 2008/02/07 05:33:45 fix kernel socket panic Affected files ... .. //depot/projects/iwarp/sys/dev/cxgb/ulp/tom/cxgb_cpl_socket.c#9 integrate Differences ... ==== //depot/projects/iwarp/sys/dev/cxgb/ulp/tom/cxgb_cpl_socket.c#9 (text+ko) ==== @@ -519,7 +519,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); @@ -926,7 +926,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); @@ -940,7 +940,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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200802070534.m175Y4Jc016080>