mirror of
https://github.com/SCST-project/scst.git
synced 2026-05-21 04:31:26 +00:00
606af434444b46a99ccc9e940f602d3485643111
The LBA field in READ(16) and READ(32) commands is 64 bits wide. Hence it is possible for an initiator not only to specify an offset that exceeds 2**63. Report an error to the initiator for such large offsets instead of triggering a BUG(). This patch fixes the following bug: BUG at scst/src/dev_handlers/scst_vdisk.c:1273 ((loff < 0) || __builtin_expect(!!(data_len < 0), 0)) ------------[ cut here ]------------ kernel BUG at /home/bart/software/scst.git/scst/src/dev_handlers/scst_vdisk.c:1273! invalid opcode: 0000 [#1] SMP CPU: 0 PID: 2852 Comm: iscsird3 Tainted: G O 3.10.0-rc1-debug+ #1 Hardware name: Bochs Bochs, BIOS Bochs 01/01/2007 RIP: 0010:[<ffffffffa0309e76>] [<ffffffffa0309e76>] vdisk_parse_offset+0x3b6/0x490 [scst_vdisk] Call Trace: [<ffffffffa030dec9>] fileio_alloc_and_parse+0x69/0x130 [scst_vdisk] [<ffffffffa030e08b>] vdisk_parse+0x3b/0xc0 [scst_vdisk] [<ffffffffa0264a2e>] scst_parse_cmd+0x8e/0xd00 [scst] [<ffffffffa029b953>] ? spin_unlock_irqrestore.constprop.0+0x13/0x20 [scst] [<ffffffffa029bad5>] ? debug_print_with_prefix+0x165/0x1f0 [scst] [<ffffffffa026c2a5>] scst_process_active_cmd+0x425/0x760 [scst] [<ffffffffa026dc7a>] scst_cmd_init_done+0x2ea/0x5c0 [scst] [<ffffffffa032aaa2>] scst_cmd_init_stage1_done.constprop.37+0x12/0x20 [iscsi_scst] [<ffffffffa03317a4>] scsi_cmnd_start+0x1f4/0x550 [iscsi_scst] [<ffffffffa0332298>] cmnd_rx_start+0x148/0x1a0 [iscsi_scst] [<ffffffffa03353a8>] process_read_io+0x3c8/0x7f0 [iscsi_scst] [<ffffffff81049929>] ? local_bh_enable_ip+0x89/0xf0 [<ffffffffa0335894>] scst_do_job_rd+0xc4/0x220 [iscsi_scst] [<ffffffffa0335e65>] istrd+0x165/0x2e0 [iscsi_scst] [<ffffffff8106da50>] ? wake_up_bit+0x40/0x40 [<ffffffffa0335d00>] ? iscsi_task_mgmt_affected_cmds_done+0x240/0x240 [iscsi_scst] [<ffffffff8106d34b>] kthread+0xdb/0xe0 [<ffffffff8106d270>] ? kthread_create_on_node+0x120/0x120 [<ffffffff815357ac>] ret_from_fork+0x7c/0xb0 [<ffffffff8106d270>] ? kthread_create_on_node+0x120/0x120 ---[ end trace c21ad13002ef1548 ]--- --- scst/src/scst_lib.c | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4903 d57e44dd-8a1f-0410-8b47-8ef2f437770f
…
This is the SCST development repository. It contains not a single project SCST as one can think, but a number of them, which are divided as the following: 1. SCST core in scst/ subdirectory 2. Administration utility for SCST core scstadmin in scstadmin/ 3. Target drivers in own subdirectories qla2x00t/, iscsi-scst/, etc. 4. User space programs in usr/ subdirectory, like fileio_tgt. 5. Some various docs in doc/ subdirectory. Those subprojects are in most cases independent from each other, although some of them depend from the SCST core. They put in the single repository only to simplify their development, they are released independently. Thus, use "make all" only if you really need to build everything. Otherwise build only what you need, like for iSCSI-SCST: make scst scst_install iscsi iscsi_install For more information about each subproject see their README files. Vladislav Bolkhovitin <vst@vlnb.net>, http://scst.sourceforge.net
Description
Languages
C
90.1%
Perl
4.2%
Shell
1.8%
HTML
1.7%
Makefile
1.2%
Other
0.9%