gdth calls scsi_do_cmd() with an uninitialized Scsi_Device structure

Manfred Spraul (manfreds@colorfullife.com)
Sun, 26 Dec 1999 19:52:07 +0100


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-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/