<feed xmlns='http://www.w3.org/2005/Atom'>
<title>snowball/igloo-kernel.git/drivers/target, branch u0</title>
<subtitle>Igloo kernel</subtitle>
<id>https://git.etezian.org/cgit.cgi/snowball/igloo-kernel.git/atom?h=u0</id>
<link rel='self' href='https://git.etezian.org/cgit.cgi/snowball/igloo-kernel.git/atom?h=u0'/>
<link rel='alternate' type='text/html' href='https://git.etezian.org/cgit.cgi/snowball/igloo-kernel.git/'/>
<updated>2011-03-23T20:04:02+00:00</updated>
<entry>
<title>target: Fix volume size misreporting for volumes &gt; 2TB</title>
<updated>2011-03-23T20:04:02+00:00</updated>
<author>
<name>Nicholas Bellinger</name>
<email>nab@linux-iscsi.org</email>
</author>
<published>2011-03-02T23:52:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.etezian.org/cgit.cgi/snowball/igloo-kernel.git/commit/?id=97272fc63f9c067b9c932e5b289f934044615603'/>
<id>urn:sha1:97272fc63f9c067b9c932e5b289f934044615603</id>
<content type='text'>
commit 904f0bc482201fa86e75c330d79dfd11be494cf8 upstream.

the target infrastructure fails to send the correct conventional size
to READ_CAPACITY that force a retry with READ_CAPACITY_16, which reads
the capacity for devices &gt; 2TB.  Fix by adding the correct return to
trigger RC(16).

Reported-by: Ben Jarvis &lt;bjarvismn@gmail.com&gt;
Signed-off-by: Signed-off-by: Nicholas A. Bellinger &lt;nab@linux-iscsi.org&gt;
Signed-off-by: James Bottomley &lt;James.Bottomley@suse.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>[SCSI] target: Fix t_transport_aborted handling in LUN_RESET + active I/O shutdown</title>
<updated>2011-02-28T17:23:32+00:00</updated>
<author>
<name>Nicholas Bellinger</name>
<email>nab@linux-iscsi.org</email>
</author>
<published>2011-02-25T00:58:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.etezian.org/cgit.cgi/snowball/igloo-kernel.git/commit/?id=52208ae3fc60cbcb214c10fb8b82304199e2cc3a'/>
<id>urn:sha1:52208ae3fc60cbcb214c10fb8b82304199e2cc3a</id>
<content type='text'>
This patch addresses two outstanding bugs related to
T_TASK(cmd)-&gt;t_transport_aborted handling during TMR LUN_RESET and
active I/O shutdown.

This first involves adding two explict t_transport_aborted=1
assignments in core_tmr_lun_reset() in order to signal the task has
been aborted, and updating transport_generic_wait_for_tasks() to skip
sleeping when t_transport_aborted=1 has been set.  This fixes an issue
where transport_generic_wait_for_tasks() would end up sleeping
indefinately when called from fabric module context while TMR
LUN_RESET was happening with long outstanding backend struct se_task
not yet being completed.

The second adds a missing call to
transport_remove_task_from_execute_queue() when
task-&gt;task_execute_queue=1 is set in order to fix an OOPs when
task-&gt;t_execute_list has not been dropped.  It also fixes the same
case in transport_processing_shutdown() to prevent the issue from
happening during active I/O struct se_device shutdown.

Signed-off-by: Nicholas A. Bellinger &lt;nab@linux-iscsi.org&gt;
Signed-off-by: James Bottomley &lt;James.Bottomley@suse.de&gt;
</content>
</entry>
<entry>
<title>[SCSI] target: fix use after free detected by SLUB poison</title>
<updated>2011-02-12T18:32:41+00:00</updated>
<author>
<name>Nicholas Bellinger</name>
<email>nab@linux-iscsi.org</email>
</author>
<published>2011-02-09T23:34:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.etezian.org/cgit.cgi/snowball/igloo-kernel.git/commit/?id=1f6fe7cba1c0a817a8712d7fdd0ec1b4ddd4ea2f'/>
<id>urn:sha1:1f6fe7cba1c0a817a8712d7fdd0ec1b4ddd4ea2f</id>
<content type='text'>
This patch moves a large number of memory release paths inside of the
configfs callback target_core_hba_item_ops-&gt;release() called from
within fs/configfs/item.c: config_item_cleanup() context.  This patch
resolves the SLUB 'Poison overwritten' warnings.

Signed-off-by: Nicholas A. Bellinger &lt;nab@linux-iscsi.org&gt;
Signed-off-by: James Bottomley &lt;James.Bottomley@suse.de&gt;
</content>
</entry>
<entry>
<title>[SCSI] target: Remove procfs based target_core_mib.c code</title>
<updated>2011-02-12T18:15:47+00:00</updated>
<author>
<name>Nicholas Bellinger</name>
<email>nab@linux-iscsi.org</email>
</author>
<published>2011-02-09T23:35:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.etezian.org/cgit.cgi/snowball/igloo-kernel.git/commit/?id=e89d15eeadb172bd53ca6362bf9ab6b22077224c'/>
<id>urn:sha1:e89d15eeadb172bd53ca6362bf9ab6b22077224c</id>
<content type='text'>
This patch removes the legacy procfs based target_core_mib.c code,
and moves the necessary scsi_index_tables functions and defines into
target_core_transport.c and target_core_base.h code to allow existing
fabric independent statistics to function.

This includes the removal of a handful of 'atomic_t mib_ref_count'
counters used in struct se_node_acl, se_session and se_hba to prevent
removal while using seq_list procfs walking logic.

[jejb: fix up compile failures]
Signed-off-by: Nicholas A. Bellinger &lt;nab@linux-iscsi.org&gt;
Signed-off-by: James Bottomley &lt;James.Bottomley@suse.de&gt;
</content>
</entry>
<entry>
<title>[SCSI] target: Fix SCF_SCSI_CONTROL_SG_IO_CDB breakage</title>
<updated>2011-02-12T18:01:42+00:00</updated>
<author>
<name>Nicholas Bellinger</name>
<email>nab@linux-iscsi.org</email>
</author>
<published>2011-02-09T23:35:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.etezian.org/cgit.cgi/snowball/igloo-kernel.git/commit/?id=e63af95888894af6ca4112dc90083d1dff0fec29'/>
<id>urn:sha1:e63af95888894af6ca4112dc90083d1dff0fec29</id>
<content type='text'>
This patch fixes a bug introduced during the v4 control CDB emulation
refactoring that broke SCF_SCSI_CONTROL_SG_IO_CDB operation within
transport_map_control_cmd_to_task().  It moves the BUG_ON() into
transport_do_se_mem_map() after the TRANSPORT(dev)-&gt;do_se_mem_map()
RAMDISK_DR special case, and adds the proper struct se_mem assignment
when !list_empty() for normal non RAMDISK_DR backend device cases.

Reported-by: Kai-Thorsten Hambrecht &lt;kai@hambrecht.org&gt;
Signed-off-by: Nicholas A. Bellinger &lt;nab@linux-iscsi.org&gt;
Signed-off-by: James Bottomley &lt;James.Bottomley@suse.de&gt;
</content>
</entry>
<entry>
<title>[SCSI] target: Fix top-level configfs_subsystem default_group shutdown breakage</title>
<updated>2011-02-12T17:39:14+00:00</updated>
<author>
<name>Nicholas Bellinger</name>
<email>nab@linux-iscsi.org</email>
</author>
<published>2011-02-09T23:34:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.etezian.org/cgit.cgi/snowball/igloo-kernel.git/commit/?id=7c2bf6e925c38b8e3358f5046971b0d6086ddcf8'/>
<id>urn:sha1:7c2bf6e925c38b8e3358f5046971b0d6086ddcf8</id>
<content type='text'>
This patch fixes two bugs uncovered during testing with
slub_debug=FPUZ during module_exit() -&gt; target_core_exit_configfs()
with release of configfs subsystem consumer default groups, namely how
this should be working with
fs/configfs/dir.c:configfs_unregister_subsystem() release logic for
struct config_group-&gt;default_group.

The first issue involves configfs_unregister_subsystem() expecting to
walk+drain the top-level subsys-&gt;su_group.default_groups directly in
unlink_group(), and not directly from the configfs subsystem consumer
for the top level struct config_group-&gt;default_groups.  This patch
drops the walk+drain of subsys-&gt;su_group.default_groups from TCM
configfs subsystem consumer code, and moves the top-level
-&gt;default_groups kfree() after configfs_unregister_subsystem() has
been called.

The second issue involves calling
core_alua_free_lu_gp(se_global-&gt;default_lu_gp) to release the
default_lu_gp-&gt;lu_gp_group before configfs_unregister_subsystem() has
been called.  This patches also moves the core_alua_free_lu_gp() call
to release default_lu_group-&gt;lu_gp_group after the subsys has been
unregistered.

Finally, this patch explictly clears the
[lu_gp,alua,hba]_cg-&gt;default_groups pointers after kfree() to ensure
that no stale memory is picked up from child struct
config_group-&gt;default_group[] while configfs_unregister_subsystem() is
called.

Reported-by: Fubo Chen &lt;fubo.chen@gmail.com&gt;
Signed-off-by: Nicholas A. Bellinger &lt;nab@linux-iscsi.org&gt;
Signed-off-by: James Bottomley &lt;James.Bottomley@suse.de&gt;
</content>
</entry>
<entry>
<title>[SCSI] target: fixed missing lock drop in error path</title>
<updated>2011-02-12T17:38:17+00:00</updated>
<author>
<name>Fubo Chen</name>
<email>fubo.chen@gmail.com</email>
</author>
<published>2011-02-09T23:34:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.etezian.org/cgit.cgi/snowball/igloo-kernel.git/commit/?id=85dc98d93f3dc41cce54118a7abab9e6aa616dd2'/>
<id>urn:sha1:85dc98d93f3dc41cce54118a7abab9e6aa616dd2</id>
<content type='text'>
The struct se_node_acl-&gt;device_list_lock needs to be released if either
sanity check for struct se_dev_entry-&gt;se_lun_acl or deve-&gt;se_lun fails.

Signed-off-by: Fubo Chen &lt;fubo.chen@gmail.com&gt;
Signed-off-by: Nicholas A. Bellinger &lt;nab@linux-iscsi.org&gt;
Signed-off-by: James Bottomley &lt;James.Bottomley@suse.de&gt;
</content>
</entry>
<entry>
<title>[SCSI] target: Fix demo-mode MappedLUN shutdown UA/PR breakage</title>
<updated>2011-02-12T17:37:29+00:00</updated>
<author>
<name>Nicholas Bellinger</name>
<email>nab@linux-iscsi.org</email>
</author>
<published>2011-02-09T23:34:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.etezian.org/cgit.cgi/snowball/igloo-kernel.git/commit/?id=29fe609d124d6d7478d1241bb82dc2e00509f516'/>
<id>urn:sha1:29fe609d124d6d7478d1241bb82dc2e00509f516</id>
<content type='text'>
This patch fixes a bug in core_update_device_list_for_node() where
individual demo-mode generated MappedLUN's UA + Persistent
Reservations metadata where being leaked, instead of falling through
and calling existing core_scsi3_ua_release_all() and
core_scsi3_free_pr_reg_from_nacl() at the end of
core_update_device_list_for_node().

This bug would manifest itself with the following OOPs w/ TPG
demo-mode endpoints (tfo-&gt;tpg_check_demo_mode()=1), and PROUT
REGISTER+RESERVE -&gt; explict struct se_session logout -&gt; struct
se_device shutdown:

[  697.021139] LIO_iblock used greatest stack depth: 2704 bytes left
[  702.235017] general protection fault: 0000 [#1] SMP
[  702.235074] last sysfs file: /sys/devices/virtual/net/lo/operstate
[  704.372695] CPU 0
[  704.372725] Modules linked in: crc32c target_core_stgt scsi_tgt target_core_pscsi target_core_file target_core_iblock target_core_mod configfs sr_mod cdrom sd_mod ata_piix mptspi mptscsih libata mptbase [last unloaded: iscsi_target_mod]
[  704.375442]
[  704.375563] Pid: 4964, comm: tcm_node Not tainted 2.6.37+ #1 440BX Desktop Reference Platform/VMware Virtual Platform
[  704.375912] RIP: 0010:[&lt;ffffffffa00aaa16&gt;]  [&lt;ffffffffa00aaa16&gt;] __core_scsi3_complete_pro_release+0x31/0x133 [target_core_mod]
[  704.376017] RSP: 0018:ffff88001e5ffcb8  EFLAGS: 00010296
[  704.376017] RAX: 6d32335b1b0a0d0a RBX: ffff88001d952cb0 RCX: 0000000000000015
[  704.376017] RDX: ffff88001b428000 RSI: ffff88001da5a4c0 RDI: ffff88001e5ffcd8
[  704.376017] RBP: ffff88001e5ffd28 R08: ffff88001e5ffcd8 R09: ffff88001d952080
[  704.377116] R10: ffff88001dfc5480 R11: ffff88001df8abb0 R12: ffff88001d952cb0
[  704.377319] R13: 0000000000000000 R14: ffff88001df8abb0 R15: ffff88001b428000
[  704.377521] FS:  00007f033d15c6e0(0000) GS:ffff88001fa00000(0000) knlGS:0000000000000000
[  704.377861] CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
[  704.378043] CR2: 00007fff09281510 CR3: 000000001e5db000 CR4: 00000000000006f0
[  704.378110] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[  704.378110] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
[  704.378110] Process tcm_node (pid: 4964, threadinfo ffff88001e5fe000, task ffff88001d99c260)
[  704.378110] Stack:
[  704.378110]  ffffea0000678980 ffff88001da5a4c0 ffffea0000678980 ffff88001f402b00
[  704.378110]  ffff88001e5ffd08 ffffffff810ea236 ffff88001e5ffd18 0000000000000282
[  704.379772]  ffff88001d952080 ffff88001d952cb0 ffff88001d952cb0 ffff88001dc79010
[  704.380082] Call Trace:
[  704.380220]  [&lt;ffffffff810ea236&gt;] ? __slab_free+0x89/0x11c
[  704.380403]  [&lt;ffffffffa00ab781&gt;] core_scsi3_free_all_registrations+0x3e/0x157 [target_core_mod]
[  704.380479]  [&lt;ffffffffa00a752b&gt;] se_release_device_for_hba+0xa6/0xd8 [target_core_mod]
[  704.380479]  [&lt;ffffffffa00a7598&gt;] se_free_virtual_device+0x3b/0x45 [target_core_mod]
[  704.383750]  [&lt;ffffffffa00a3177&gt;] target_core_drop_subdev+0x13a/0x18d [target_core_mod]
[  704.384068]  [&lt;ffffffffa00960db&gt;] client_drop_item+0x25/0x31 [configfs]
[  704.384263]  [&lt;ffffffffa00967b5&gt;] configfs_rmdir+0x1a1/0x223 [configfs]
[  704.384459]  [&lt;ffffffff810fa8cd&gt;] vfs_rmdir+0x7e/0xd3
[  704.384631]  [&lt;ffffffff810fc3be&gt;] do_rmdir+0xa3/0xf4
[  704.384895]  [&lt;ffffffff810eed15&gt;] ? filp_close+0x67/0x72
[  704.386485]  [&lt;ffffffff810fc446&gt;] sys_rmdir+0x11/0x13
[  704.387893]  [&lt;ffffffff81002a92&gt;] system_call_fastpath+0x16/0x1b
[  704.388083] Code: 4c 8d 45 b0 41 56 49 89 d7 41 55 41 89 cd 41 54 b9 15 00 00 00 53 48 89 fb 48 83 ec 48 4c 89 c7 48 89 75 98 48 8b 86 28 01 00 00 &lt;48&gt; 8b 80 90 01 00 00 48 89 45 a0 31 c0 f3 aa c7 45 ac 00 00 00
[  704.388763] RIP  [&lt;ffffffffa00aaa16&gt;] __core_scsi3_complete_pro_release+0x31/0x133 [target_core_mod]
[  704.389142]  RSP &lt;ffff88001e5ffcb8&gt;
[  704.389572] ---[ end trace 2a3614f3cd6261a5 ]---

Signed-off-by: Nicholas A. Bellinger &lt;nab@linux-iscsi.org&gt;
Signed-off-by: James Bottomley &lt;James.Bottomley@suse.de&gt;
</content>
</entry>
<entry>
<title>[SCSI] target/iblock: Fix failed bd claim NULL pointer dereference</title>
<updated>2011-02-12T17:37:00+00:00</updated>
<author>
<name>Nicholas Bellinger</name>
<email>nab@linux-iscsi.org</email>
</author>
<published>2011-02-09T23:34:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.etezian.org/cgit.cgi/snowball/igloo-kernel.git/commit/?id=bc66552476d3faf706ea72f5a082df717ed6c30d'/>
<id>urn:sha1:bc66552476d3faf706ea72f5a082df717ed6c30d</id>
<content type='text'>
This patch adds an explict check for struct iblock_dev-&gt;ibd_bd in
iblock_free_device() before calling blkdev_put(), which will otherwise hit
the following NULL pointer dereference @ ib_dev-&gt;ibd_bd when iblock_create_virtdevice()
fails to claim an already in-use struct block_device via blkdev_get_by_path().

[  112.528578] Target_Core_ConfigFS: Allocated struct se_subsystem_dev: ffff88001e750000 se_dev_su_ptr: ffff88001dd05d70
[  112.534681] Target_Core_ConfigFS: Calling t-&gt;free_device() for se_dev_su_ptr: ffff88001dd05d70
[  112.535029] BUG: unable to handle kernel NULL pointer dereference at 0000000000000020
[  112.535029] IP: [&lt;ffffffff814987a3&gt;] mutex_lock+0x14/0x35
[  112.535029] PGD 1e5d0067 PUD 1e274067 PMD 0
[  112.535029] Oops: 0002 [#1] SMP
[  112.535029] last sysfs file: /sys/devices/pci0000:00/0000:00:07.1/host2/target2:0:0/2:0:0:0/type
[  112.535029] CPU 0
[  112.535029] Modules linked in: iscsi_target_mod target_core_stgt scsi_tgt target_core_pscsi target_core_file target_core_iblock target_core_mod configfs sr_mod cdrom sd_mod ata_piix mptspi mptscsih libata mptbase [last unloaded: scsi_wait_scan]
[  112.535029]
[  112.535029] Pid: 3345, comm: python2.5 Not tainted 2.6.37+ #1 440BX Desktop Reference Platform/VMware Virtual Platform
[  112.535029] RIP: 0010:[&lt;ffffffff814987a3&gt;]  [&lt;ffffffff814987a3&gt;] mutex_lock+0x14/0x35
[  112.535029] RSP: 0018:ffff88001e6d7d58  EFLAGS: 00010246
[  112.535029] RAX: 0000000000000000 RBX: 0000000000000020 RCX: 0000000000000082
[  112.535029] RDX: ffff88001e6d7fd8 RSI: 0000000000000083 RDI: 0000000000000020
[  112.535029] RBP: ffff88001e6d7d68 R08: 0000000000000000 R09: 0000000000000000
[  112.535029] R10: ffff8800000be860 R11: ffff88001f420000 R12: 0000000000000020
[  112.535029] R13: 0000000000000083 R14: ffff88001d809430 R15: ffff88001d8094f8
[  112.535029] FS:  00007ff17ca7d6e0(0000) GS:ffff88001fa00000(0000) knlGS:0000000000000000
[  112.535029] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[  112.535029] CR2: 0000000000000020 CR3: 000000001e5d2000 CR4: 00000000000006f0
[  112.535029] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[  112.535029] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
[  112.535029] Process python2.5 (pid: 3345, threadinfo ffff88001e6d6000, task ffff88001e2d0760)
[  112.535029] Stack:
[  112.535029]  ffff88001e6d7d88 0000000000000000 ffff88001e6d7d98 ffffffff811187fc
[  112.535029]  ffff88001d809430 ffff88001dd05d70 ffff88001e750860 ffff88001e750000
[  112.535029]  ffff88001e6d7db8 ffffffffa00e3757 ffff88001e6d7db8 0000000000000004
[  112.535029] Call Trace:
[  112.535029]  [&lt;ffffffff811187fc&gt;] blkdev_put+0x28/0x107
[  112.535029]  [&lt;ffffffffa00e3757&gt;] iblock_free_device+0x1d/0x36 [target_core_iblock]
[  112.535029]  [&lt;ffffffffa00a319c&gt;] target_core_drop_subdev+0x15f/0x18d [target_core_mod]
[  112.535029]  [&lt;ffffffffa00960db&gt;] client_drop_item+0x25/0x31 [configfs]
[  112.535029]  [&lt;ffffffffa00967b5&gt;] configfs_rmdir+0x1a1/0x223 [configfs]
[  112.535029]  [&lt;ffffffff810fa8cd&gt;] vfs_rmdir+0x7e/0xd3
[  112.535029]  [&lt;ffffffff810fc3be&gt;] do_rmdir+0xa3/0xf4
[  112.535029]  [&lt;ffffffff810fc446&gt;] sys_rmdir+0x11/0x13
[  112.535029]  [&lt;ffffffff81002a92&gt;] system_call_fastpath+0x16/0x1b
[  112.535029] Code: 8b 04 25 88 b5 00 00 48 2d d8 1f 00 00 48 89 43 18 31 c0 5e 5b c9 c3 55 48 89 e5 53 48 89 fb 48 83 ec 08 e8 c4 f7 ff ff 48 89 df &lt;3e&gt; ff 0f 79 05 e8 1e ff ff ff 65 48 8b 04 25 88 b5 00 00 48 2d
[  112.535029] RIP  [&lt;ffffffff814987a3&gt;] mutex_lock+0x14/0x35
[  112.535029]  RSP &lt;ffff88001e6d7d58&gt;
[  112.535029] CR2: 0000000000000020
[  132.679636] ---[ end trace 05754bb48eb828f0 ]---

Note it also adds an second explict check for ib_dev-&gt;ibd_bio_set before calling
bioset_free() to fix the same possible NULL pointer deference during an early
iblock_create_virtdevice() failure.

Signed-off-by: Nicholas A. Bellinger &lt;nab@linux-iscsi.org&gt;
Signed-off-by: James Bottomley &lt;James.Bottomley@suse.de&gt;
</content>
</entry>
<entry>
<title>[SCSI] target: iblock/pscsi claim checking for NULL instead of IS_ERR</title>
<updated>2011-02-12T17:29:07+00:00</updated>
<author>
<name>Dan Carpenter</name>
<email>error27@gmail.com</email>
</author>
<published>2011-02-09T23:34:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.etezian.org/cgit.cgi/snowball/igloo-kernel.git/commit/?id=3ae279d25954de47c704ca713a2711ac10fcd1ee'/>
<id>urn:sha1:3ae279d25954de47c704ca713a2711ac10fcd1ee</id>
<content type='text'>
blkdev_get_by_path() returns an ERR_PTR() or error and it doesn't return
a NULL.  It looks like this bug would be easy to trigger by mistake.

Signed-off-by: Dan Carpenter &lt;error27@gmail.com&gt;
Signed-off-by: Nicholas A. Bellinger &lt;nab@linux-iscsi.org&gt;
Signed-off-by: James Bottomley &lt;James.Bottomley@suse.de&gt;
</content>
</entry>
</feed>
