ib_srpt: Update README

git-svn-id: https://scst.svn.sourceforge.net/svnroot/scst/trunk@4502 d57e44dd-8a1f-0410-8b47-8ef2f437770f
The comment above scst_act.acg_list_entry was correct until the sysfs
interface was introduced. Update it with information about how acg_list_entry
is used in the sysfs interface.

Signed-off-by: Bart Van Assche <bvanassche@acm.org>



git-svn-id: https://scst.svn.sourceforge.net/svnroot/scst/trunk@4503 d57e44dd-8a1f-0410-8b47-8ef2f437770f
The scst_unregister_target() call frees *tgt and hence also
tgt->tgt_list.next. Avoid that unregistering all targets triggers
a use-after-free of tgt->tgt_list.next. Found this through source
reading.

Signed-off-by: Bart Van Assche <bvanassche@acm.org>



git-svn-id: https://scst.svn.sourceforge.net/svnroot/scst/trunk@4504 d57e44dd-8a1f-0410-8b47-8ef2f437770f
scst_user: Change a goto statement into an explicit loop

Avoids that anyone who's reading this code has to find out whether or not
the ucmd_put() call can drop the reference count to zero, in which the
ucmd2->hash_list_entry.next access would be a use-after-free.

Signed-off-by: Bart Van Assche <bvanassche@acm.org>




git-svn-id: https://scst.svn.sourceforge.net/svnroot/scst/trunk@4505 d57e44dd-8a1f-0410-8b47-8ef2f437770f
srpt/README: Recommend to disable CONFIG_SCHED_DEBUG and CONFIG_SCHEDSTATS

git-svn-id: https://scst.svn.sourceforge.net/svnroot/scst/trunk@4507 d57e44dd-8a1f-0410-8b47-8ef2f437770f
srpt/README: Recommend to use SLAB instead of SLUB

git-svn-id: https://scst.svn.sourceforge.net/svnroot/scst/trunk@4508 d57e44dd-8a1f-0410-8b47-8ef2f437770f
scst: Document CONFIG_SCST_DEBUG_SYSFS_EAGAIN

Signed-off-by: Bart Van Assche <bvanassche@acm.org>



git-svn-id: https://scst.svn.sourceforge.net/svnroot/scst/trunk@4509 d57e44dd-8a1f-0410-8b47-8ef2f437770f
qla2x00t: Display a clear error message if the kernel is too old

For the people who try to build this driver before reading
qla2x00t/qla2x00-target/README.

Signed-off-by: Bart Van Assche <bvanassche@acm.org>



git-svn-id: https://scst.svn.sourceforge.net/svnroot/scst/trunk@4510 d57e44dd-8a1f-0410-8b47-8ef2f437770f
ib_srpt README: Add more performance notes

git-svn-id: https://scst.svn.sourceforge.net/svnroot/scst/trunk@4511 d57e44dd-8a1f-0410-8b47-8ef2f437770f
Fix scst_local crash on 0 response data len w/o data buffer allocated

+ some related cleanups

Reported by Richard Sharpe <realrichardsharpe@gmail.com>



git-svn-id: https://scst.svn.sourceforge.net/svnroot/scst/trunk@4512 d57e44dd-8a1f-0410-8b47-8ef2f437770f
Fix possible BUG_ON() on multiple forced commands release



git-svn-id: https://scst.svn.sourceforge.net/svnroot/scst/trunk@4513 d57e44dd-8a1f-0410-8b47-8ef2f437770f
ib_srpt README: Add more performance notes

git-svn-id: https://scst.svn.sourceforge.net/svnroot/scst/trunk@4514 d57e44dd-8a1f-0410-8b47-8ef2f437770f
Avoid that enabling a target too quickly triggers a crash

The sysfs attributes of a target can be accessed before scst_tgt.tgt_priv
has been set. Avoid that such an access triggers a crash.

Symptom:
BUG: unable to handle kernel NULL pointer dereference at 000000000000004c
IP: [<ffffffffa1345848>] iscsi_is_target_enabled+0x8/0x20 [iscsi_scst]
PGD 150a4c067 PUD 13cacb067 PMD 0
Oops: 0000 [#1] SMP
CPU 1
Modules linked in: zfs(P) iscsi_scst(O) scst_vdisk(O) scst(O) zcommon(P) znvpair(P) zavl(P) zunicode(P) spl(O) [last unloaded: zfs]
Pid: 3974, comm: scst_uid1864 Tainted: P           O 3.2.23-zfsiscsi-std-ipv6-64 #3 Supermicro X6DVA/X6DVA
RIP: 0010:[<ffffffffa1345848>]  [<ffffffffa1345848>] iscsi_is_target_enabled+0x8/0x20 [iscsi_scst]
RSP: 0018:ffff88015071ddc0  EFLAGS: 00010282
RAX: 0000000000000000 RBX: ffff880181fdaa00 RCX: ffff88012d41f380
RDX: ffff88015071c010 RSI: 0000000000000000 RDI: ffff880181fdaa00
RBP: ffff88015071ddc0 R08: 0000000000000000 R09: 0000000000000001
R10: 0000000000000001 R11: 0000000000000001 R12: ffffffffa134a608
R13: 0000000000000000 R14: 0000000000000129 R15: ffffffffa134a4c0
FS:  0000000000000000(0000) GS:ffff88019fc80000(0000)
knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
CR2: 000000000000004c CR3: 0000000151927000 CR4: 00000000000006e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
Process scst_uid1864 (pid: 3974, threadinfo ffff88015071c000, task ffff880194d57500)
Stack:
 ffff88015071de10 ffffffffa12ee89a 00000000fffffffc 01ff88015071de98
 ffff88015071de80 ffff8801932a48d8 00000000fffffffc ffff88015071de98
 ffff88015071de80 ffff880194d57500 ffff88015071de30 ffffffffa12f582e
Call Trace:
 [<ffffffffa12ee89a>] __scst_is_relative_target_port_id_unique+0x6a/0xc0 [scst]
 [<ffffffffa12f582e>] gen_relative_target_port_id+0x6e/0xd0 [scst]
 [<ffffffffa12fdb8a>] scst_tgt_enable_store_work_fn+0x3a/0xe0 [scst]
 [<ffffffffa12f9397>] sysfs_work_thread_fn+0xc7/0x2e0 [scst]
 [<ffffffffa12f92d0>] ? scst_tgtt_release+0x20/0x20 [scst]
 [<ffffffffa12f92d0>] ? scst_tgtt_release+0x20/0x20 [scst]
 [<ffffffff810b44f6>] kthread+0x96/0xa0
 [<ffffffff81b8ed74>] kernel_thread_helper+0x4/0x10
 [<ffffffff810b4460>] ? kthread_worker_fn+0x180/0x180
 [<ffffffff81b8ed70>] ? gs_change+0xb/0xb
Code: 42 c8 74 0f 39 78 48 75 ea c9 c3 0f 1f 84 00 00 00 00 00 31 c0 c9 c3 66 66 66 2e 0f 1f 84 00 00 00 00 00 48 8b 47 48 55 48 89 e5 <0f> b6 40 4c c9 83 e0 01 c3 66 66 66 66 66 66 2e 0f 1f 84 00 00
RIP  [<ffffffffa1345848>] iscsi_is_target_enabled+0x8/0x20 [iscsi_scst]
 RSP <ffff88015071ddc0>
CR2: 000000000000004c
---[ end trace 6311d4069703be07 ]---

Reported-by: Etienne Dechamps <e-t172@akegroup.org>
Signed-off-by: Bart Van Assche <bvanassche@acm.org> with some modifications



git-svn-id: https://scst.svn.sourceforge.net/svnroot/scst/trunk@4515 d57e44dd-8a1f-0410-8b47-8ef2f437770f
ib_srpt: Convert two functions two single-exit style


git-svn-id: https://scst.svn.sourceforge.net/svnroot/scst/trunk@4516 d57e44dd-8a1f-0410-8b47-8ef2f437770f
cmd's bufflen and data_len overflow cleanups



git-svn-id: https://scst.svn.sourceforge.net/svnroot/scst/trunk@4517 d57e44dd-8a1f-0410-8b47-8ef2f437770f
Docs and web updates



git-svn-id: https://scst.svn.sourceforge.net/svnroot/scst/trunk@4518 d57e44dd-8a1f-0410-8b47-8ef2f437770f
Increase version to -pre2. Pre1 was staying for too long.



git-svn-id: https://scst.svn.sourceforge.net/svnroot/scst/trunk@4519 d57e44dd-8a1f-0410-8b47-8ef2f437770f
fcst: Fix a recently introduced compiler warning


git-svn-id: https://scst.svn.sourceforge.net/svnroot/scst/trunk@4520 d57e44dd-8a1f-0410-8b47-8ef2f437770f
scripts/test-persistent-reservation: Enable APTPL


git-svn-id: https://scst.svn.sourceforge.net/svnroot/scst/trunk@4521 d57e44dd-8a1f-0410-8b47-8ef2f437770f
New ppa package: 3.0.0~pre2+svn4521-ppa1

* Updated to SCST 3.0.0-pre2, svn4521
* Changed source format to 3.0 (quilt)