[7754] in linux-scsi channel archive

home help back first fref pref prev next nref lref last post

gdth calls scsi_do_cmd() with an uninitialized Scsi_Device structure

daemon@ATHENA.MIT.EDU (Manfred Spraul)
Sun Dec 26 13:54:32 1999

Message-ID: <386663D7.5ACC70E@colorfullife.com>
Date:   Sun, 26 Dec 1999 19:52:07 +0100
From: Manfred Spraul <manfreds@colorfullife.com>
MIME-Version: 1.0
To: Sergey Kubushin <ksi@ksi-linux.com>,
	linux-kernel@vger.rutgers.edu, linux-scsi@vger.rutgers.edu
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Sergey Kubushin wrote:
> 
> 
> As one can see the output ends on "Physical Devices:", no even a new line
> after it.
> 
We are in gdth_get_info(), somewhere in the long loop.

> > Trace; c010bea1 <error_code+2d/34>
> > Trace; d080915c <[scsi_mod]scsi_insert_special_cmd+6c/78>
The function dereferences cmd->device->request_fn.

> > Trace; d0801b04 <[scsi_mod]scsi_do_cmd+18c/1b4>
> > Trace; d081a114 <[gdth]gdth_do_cmd+9c/e0>
> > Trace; d081a158 <[gdth]gdth_scsi_done+0/58>
> > Trace; d0819131 <[gdth]gdth_get_info+4fd/1444>
> 

Ok, I found the problem:

static int gdth_get_info()
{
	[...]
	Scsi_Device sdev;
	[...]

	memset(&sdev,0,sizeof(Scsi_device));
	[...]
	scp.device = &sdev;
	scsi_do_cmd(&scp,...)
}

gdth calls scsi_do_cmd() with an uninitialized Scsi_Device structure!
Unfortunately, I have no idea how to solve it [except killing the /proc
interface], perhaps someone who understands the scsi layer could fix it?


> It'd be very good. But I don't know how to help you any further...
> Unfortunately, I don't have a line printer around to use an lp console...

Thanks for your patience!

--
	Manfred


-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.rutgers.edu

home help back first fref pref prev next nref lref last post