Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 28 Apr 2001 11:47:11 +1000
From:      Michael Samuel <michael@miknet.net>
To:        freebsd-scsi@freebsd.org
Subject:   NULL pointer deref in scsi_sense_desc
Message-ID:  <20010428114711.A7571@miknet.net>

next in thread | raw e-mail | index | archive | help

Hi,

I got a "Page fault in kernel mode" which writing to a SCSI tape (which had
barfed on me with some SCSI sense messages shortly before the crash).

This is in -current from the CVS as of about a week or 2 ago.

It stopped at scsi_sense_desc+0x2f, which resolved in gdb -k to
cam/scsi/scsi_all.c line 1573, which in my copy of the source tree looks
like this:

void
scsi_sense_desc(int sense_key, int asc, int ascq,
                struct scsi_inquiry_data *inq_data,
                const char **sense_key_desc, const char **asc_desc)
{
        const struct asc_table_entry *asc_entry;
        const struct sense_key_table_entry *sense_entry;
 
        fetchtableentries(sense_key, asc, ascq,
                          inq_data,
                          &sense_entry,
                          &asc_entry);
 
        *sense_key_desc = sense_entry->desc;

It seems as though sense_entry is NULL after fetchtableentries() returns,
which when I took a quick peek at fetchtableentries(), it indicates that it
couldn't find a match.

I'm not subscribed to this list, but if you need more info, feel free to
send me an email directly (or Cc me in your follow-ups).

-- 
Michael Samuel <michael@miknet.net>

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-scsi" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010428114711.A7571>