From owner-freebsd-scsi Wed Apr 23 22:37:14 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id WAA17180 for freebsd-scsi-outgoing; Wed, 23 Apr 1997 22:37:14 -0700 (PDT) Received: from sendero.i-connect.net (sendero-ppp.i-Connect.Net [206.190.143.100]) by hub.freebsd.org (8.8.5/8.8.5) with ESMTP id WAA17147; Wed, 23 Apr 1997 22:36:58 -0700 (PDT) Received: (from shimon@localhost) by sendero.i-connect.net (8.8.5/8.8.5) id WAA03496; Wed, 23 Apr 1997 22:36:12 -0700 (PDT) Message-ID: X-Mailer: XFMail 1.1-alpha [p0] on FreeBSD X-PRIORITY: 2 (High) Priority: urgent Content-Type: text/plain; charset=iso-8859-8 Content-Transfer-Encoding: 8bit MIME-Version: 1.0 Date: Wed, 23 Apr 1997 22:25:18 -0700 (PDT) Organization: iConnect Corp. From: Simon Shapiro To: freebsd-scsi@freebsd.org, freebsd-bugs@freebsd.org Subject: Panic in sys/scsi/scsiconf.c - Please Help... Sender: owner-freebsd-scsi@freebsd.org X-Loop: FreeBSD.org Precedence: bulk I think I posted this before, but now I am stuck, and with no answers so far. So here it is again: I am calling scsi_attachdevs() from a device driver and getting PANIC: extend_set: entry 1 already has storage panic: scsi-attachdevs: malloc. Upon close examination one sees the lines: if(scbus == 0 || scbus->sc_link == 0 || extend_set(scbusses, scsibus, scbus) == 0) { panic("scsi_attachdevs: malloc"); ... When one examins the extend_set erorr message one sees quickly that it returns zero (NULL) when it discovers that the storage being extended is already extended. I am a bit confused abouth this as if storage is already allocated, why would extend_set try to extend it before checking? Also, why would it return ZERO if there IS storage. I am a bit confused. BTW, this happens only on the 176th device on the SCSI bus, so it is a bit difficult to see on most systems. I have disabled the return 0 in extend_set for now, but really need someone who understands this code to tell me which is the proper way of handling it. Thanx, Simon us->sc_link == 0 || extend_set(scbusses, scsibus, scbus) == 0) { panic("scsi_attachdevs: malloc"); ... When one examins the extend_set erorr message one sees quickly that it returns zero (NULL) when