Subject: port-i386/27439: ipw crashes under heavy load
To: None <gnats-bugs@gnats.NetBSD.org>
From: None <nis@mist.i.u-tokyo.ac.jp>
List: netbsd-bugs
Date: 10/25/2004 06:14:57
>Number:         27439
>Category:       port-i386
>Synopsis:       ipw crashes under heavy load
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    port-i386-maintainer
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Oct 25 06:15:01 UTC 2004
>Closed-Date:
>Last-Modified:
>Originator:     Shingo Nishioka
>Release:        NetBSD 2.99.10
>Organization:
University of Tokyo
>Environment:
NetBSD judith.psdlab.org. 2.99.10 NetBSD 2.99.10 (JUDITH) #1: Mon Oct 25 14:34:32 JST 2004  nis@judith.psdlab.org.:/usr/obj/sys/arch/i386/compile/JUDITH i386
>Description:
Under heavy load, in sys/dev/pci/if_ipw.c:719, `shdr' will be NULL.
>How-To-Repeat:
Uncertain.
Just use ipw heavily
>Fix:
Following (ad-hoc) patch temporarily fix the problem.

--- if_ipw.c.orig       2004-10-25 14:42:53.000000000 +0900
+++ if_ipw.c    2004-10-25 14:42:40.000000000 +0900
@@ -719,6 +719,8 @@
        shdr = TAILQ_FIRST(&sc->sc_free_shdr);
        sbuf = TAILQ_FIRST(&sc->sc_free_sbuf);

+if (!shdr) return 0;
+
        shdr->hdr.type = htole32(IPW_HDR_TYPE_SEND);
        shdr->hdr.subtype = htole32(0);
        shdr->hdr.encrypted = (wh->i_fc[1] & IEEE80211_FC1_WEP) ? 1 : 0;
>Release-Note:
>Audit-Trail:
>Unformatted: