Skip to contentSkip to conversation

PROBLEM: linux-2.6.0-test9 oops when loading scsi module (aha152x)

PATCH Randy.Dunlap 1 participant 1 message Oct 27, 2003

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

(redirected to linux-scsi mailing list)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Date: Mon, 27 Oct 2003 11:21:52 -0500 (EST)
From: "Kenneth H. Braun" <[email protected]>
To: [email protected]
Cc: [email protected]
Subject: PROBLEM: linux-2.6.0-test9 oops when loading scsi module (aha152x)

Hi Folks

This is my first attempt at posting an oops report so please bear with me.

Please cc me directly - I am on a horribly slow dial-up and do not subscribe to lkml.

The diagnostic stuff that I am attaching was generated using kernel 2.6-test9 but 2.6-test7 and 2.6-test8 do the same thing.

Whenever the aha152x driver attempts to load, whether as a module or as a kernel "built-in" it Oopses. I have attached a gzipped tarball of all the info that I have been able to gather. The stuff from /proc was taken just prior to invoking "modprobe aha152x". I have also included excerpts from the syslog and messages files.

Let me know if you need anything else and I will try to get it for you.

Thanks for your help

-- Ken --

Ken Braun
Sysadmin at sneakernet.com
[email protected]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

1. The oops-files.tar.gz attachment is not gzipped, it's just a tar file.

2. Looks to me like aha152x::busfree_run() is reference cmnd->device->... without initializing it. Below is a simple patch to initialize it.

SCSI people, is it OK to copy device pointers like this? Is there a reference counting method for this? Is there a SCSI kernel API that should be used instead?

--
~Randy

description: busfree_run() allocates a cmnd and references

		cmnd->device->... without setting cmd->device

changelog: _
product_versions: Linux 2.6.0-test9
patch_name: aha152x-device-ptr.patch
author: Randy.Dunlap <[email protected]>
patch_version: 2003-10-27.10:54:42

diffstat:=

 drivers/scsi/aha152x.c |    1 +
 1 files changed, 1 insertion(+)
drivers/scsi/aha152x.c renamed from drivers/scsi/aha152x.c~aha152xfix +1 -0
diff -Naurp ./drivers/scsi/aha152x.c~aha152xfix ./drivers/scsi/aha152x.c
@@ -2018,6 +2018,7 @@ static void busfree_run(struct Scsi_Host
 					cmnd->cmnd[4]         = sizeof(ptr->sense_buffer);
 					cmnd->cmnd[5]         = 0;
 					cmnd->cmd_len	      = 6;
+					cmnd->device          = ptr->device;
 					cmnd->device->host    = ptr->device->host;
 					cmnd->device->id      = ptr->device->id;
 					cmnd->device->lun     = ptr->device->lun;