[stgt] Problem: automatic vtl setup using targets.conf vs script, failing on automatic

Mark Harvey markh794 at gmail.com
Thu Nov 5 00:40:32 CET 2009


On Wed, Nov 4, 2009 at 10:46 PM, Albert Pauw <albert.pauw at gmail.com> wrote:
> Mark Harvey wrote:
>>
>> I'll retry with this tgt-admin..
>>
>> But the one in the tgt src code does not create the SMC device, hence
>> there is no use trying to go any further.
>>
>> Cheers
>
> Hi Mark,
>
> the one I sent you is the modified version of Tomasz, that's the one for
> which he is going to send in the patch
> for inclusion. He's curious like me what this bug is.
>
> Hope you can reproduce it.
>
> Let me know if I can be of any help,
>
> Albert
>

OK, the core dump is reproduced.

Why it is triggered by tgt-admin and not manually, I've not attempted
to track down.

The issue is mtx is allocating '40 bytes' of space for the return of
READ ELEMENT STATUS.
The actual amount of memory required is about 1.5k.

The SMC is building the data structure in memory and ignoring the '40
byte' limit.
This is a bug with the SMC code. The standards state that the size of
the structure (1.5k) should be returned, but the data should be
truncated to the allocated length (40 bytes in this case).

This is not going to be a quick fix, as this SCSI OP code is really,
really messy.

I'm on it and will have a fix as soon as possible.

Mark
--
To unsubscribe from this list: send the line "unsubscribe stgt" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html



More information about the stgt mailing list