<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux.git/drivers/target, branch v3.1-rc2</title>
<subtitle>Linux kernel source tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/'/>
<entry>
<title>Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending</title>
<updated>2011-08-04T01:12:09+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2011-08-04T01:12:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=a9e4e6e14c322e08d1c615afc8f504fb415f9613'/>
<id>a9e4e6e14c322e08d1c615afc8f504fb415f9613</id>
<content type='text'>
* 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending:
  tcm_fc: Handle DDP/SW fc_frame_payload_get failures in ft_recv_write_data
  target: Fix bug for transport_generic_wait_for_tasks with direct operation
  target: iscsi_target depends on NET
  target: Fix WRITE_SAME_16 lba assignment breakage
  MAINTAINERS: Add target-devel list for drivers/target/
  iscsi-target: Fix CONFIG_SMP=n and CONFIG_MODULES=n build failure
  iscsi-target: Fix snprintf usage with MAX_PORTAL_LEN
  iscsi-target: Fix uninitialized usage of cmd-&gt;pad_bytes
  iscsi-target: strlen() doesn't count the terminator
  iscsi-target: Fix NULL dereference on allocation failure
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending:
  tcm_fc: Handle DDP/SW fc_frame_payload_get failures in ft_recv_write_data
  target: Fix bug for transport_generic_wait_for_tasks with direct operation
  target: iscsi_target depends on NET
  target: Fix WRITE_SAME_16 lba assignment breakage
  MAINTAINERS: Add target-devel list for drivers/target/
  iscsi-target: Fix CONFIG_SMP=n and CONFIG_MODULES=n build failure
  iscsi-target: Fix snprintf usage with MAX_PORTAL_LEN
  iscsi-target: Fix uninitialized usage of cmd-&gt;pad_bytes
  iscsi-target: strlen() doesn't count the terminator
  iscsi-target: Fix NULL dereference on allocation failure
</pre>
</div>
</content>
</entry>
<entry>
<title>tcm_fc: Handle DDP/SW fc_frame_payload_get failures in ft_recv_write_data</title>
<updated>2011-08-03T09:38:21+00:00</updated>
<author>
<name>Kiran Patil</name>
<email>kiran.patil@intel.com</email>
</author>
<published>2011-08-03T09:20:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=dcd998ccdbf74a7d8fe0f0a44e85da1ed5975946'/>
<id>dcd998ccdbf74a7d8fe0f0a44e85da1ed5975946</id>
<content type='text'>
Problem: HW DDP context was not invalidated in case of ABORTS, etc...
This leads to the problem where memory pages which are used for DDP
as user descriptor could get reused for some other purpose (such as to
satisfy new memory allocation request either by kernel or user mode threads)
and since HW DDP context was not invalidated, HW continue to write to
those pages, hence causing memory corruption.

Fix: Either on incoming ABORTS or due to exchange time out, allowed the
target to cleanup HW DDP context if it was setup for respective ft_cmd.
Added new function to perform this cleanup, furthur it can be enhanced
for other cleanup activity.  Fix ft_recv_write_data() to properly handle
fc_frame_payload_get to return pointer to payload if it exist. If there is
no payload which is most common case (+ve case in case if DDP is working
as expected, it will return NULL. Yes, scope of buf is limited to printk.
Invalidation of HW context (which is done inside ft_invl_hw_context() is
necessary in SUCCESS and FAILURE case of DDP. Hence invalidation is DONE
as long as there was DDP setup (whether it worked correctly or not,

NOTE: For some reason, if there is any error w.r.t DDP such as out of
order packet reception, HW simply post the full packet in rx queue.

Signed-off-by: Kiran Patil &lt;kiran.patil@intel.com&gt;
Cc: Robert W Love &lt;robert.w.love@intel.com&gt;
Signed-off-by: Nicholas A. Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Problem: HW DDP context was not invalidated in case of ABORTS, etc...
This leads to the problem where memory pages which are used for DDP
as user descriptor could get reused for some other purpose (such as to
satisfy new memory allocation request either by kernel or user mode threads)
and since HW DDP context was not invalidated, HW continue to write to
those pages, hence causing memory corruption.

Fix: Either on incoming ABORTS or due to exchange time out, allowed the
target to cleanup HW DDP context if it was setup for respective ft_cmd.
Added new function to perform this cleanup, furthur it can be enhanced
for other cleanup activity.  Fix ft_recv_write_data() to properly handle
fc_frame_payload_get to return pointer to payload if it exist. If there is
no payload which is most common case (+ve case in case if DDP is working
as expected, it will return NULL. Yes, scope of buf is limited to printk.
Invalidation of HW context (which is done inside ft_invl_hw_context() is
necessary in SUCCESS and FAILURE case of DDP. Hence invalidation is DONE
as long as there was DDP setup (whether it worked correctly or not,

NOTE: For some reason, if there is any error w.r.t DDP such as out of
order packet reception, HW simply post the full packet in rx queue.

Signed-off-by: Kiran Patil &lt;kiran.patil@intel.com&gt;
Cc: Robert W Love &lt;robert.w.love@intel.com&gt;
Signed-off-by: Nicholas A. Bellinger &lt;nab@linux-iscsi.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>target: Fix bug for transport_generic_wait_for_tasks with direct operation</title>
<updated>2011-07-30T12:01:25+00:00</updated>
<author>
<name>Nicholas Bellinger</name>
<email>nab@linux-iscsi.org</email>
</author>
<published>2011-07-30T12:03:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=dd8ae59d48790d5c25f47ebbe502c8ca379fdde0'/>
<id>dd8ae59d48790d5c25f47ebbe502c8ca379fdde0</id>
<content type='text'>
This patch fixes a bug in transport_handle_cdb_direct() usage with target_core
where transport_generic_wait_for_tasks() was bypassing active I/O + usage of
cmd-&gt;t_transport_stop_comp because cmd-&gt;t_transport_active=1 was not being set
before dispatching with transport_generic_new_cmd().  The fix follows existing
usage in transport_generic_handle_cdb*() -&gt; transport_add_cmd_to_queue() and
set these directly, as well as handle transport_generic_new_cmd() exceptions
for QUEUE_FULL and CHECK_CONDITION instead of propigating up to RX context
fabric code.

The bug was manifesting itself with the following SLUB poison overwritten
warnings with iscsi-target v4.1 LUNs using the new process context direct
operation during session reinstatement with active I/O exception handling:

[885410.498267] =============================================================================
[885410.621622] BUG lio_cmd_cache: Poison overwritten
[885410.621791] -----------------------------------------------------------------------------
[885410.621792]
[885410.623420] INFO: 0xffff880000cf3750-0xffff880000cf378d. First byte 0x6a instead of 0x6b
[885410.626332] INFO: Allocated in iscsit_allocate_cmd+0x1c/0xd4 [iscsi_target_mod] age=345 cpu=1 pid=22554
[885411.855189] INFO: Freed in iscsit_release_cmd+0x208/0x217 [iscsi_target_mod] age=1410 cpu=1 pid=22554
[885411.856048] INFO: Slab 0xffffea000002d480 objects=22 used=0 fp=0xffff880000cf7300 flags=0x4080
[885411.856368] INFO: Object 0xffff880000cf33c0 @offset=13248 fp=0xffff880000cf6780

&lt;SNIP&gt;

[885411.955678] Pid: 22554, comm: iscsi_trx Not tainted 3.0.0-rc7+ #30
[885411.956040] Call Trace:
[885411.957029]  [&lt;ffffffff810e5cf9&gt;] print_trailer+0x12e/0x137
[885412.752879]  [&lt;ffffffff810e61d9&gt;] check_bytes_and_report+0xb9/0xfd
[885412.754933]  [&lt;ffffffff810e62d2&gt;] check_object+0xb5/0x192
[885412.755099]  [&lt;ffffffff810e6445&gt;] __free_slab+0x96/0x13a
[885412.757008]  [&lt;ffffffff810e652a&gt;] discard_slab+0x41/0x43
[885412.758171]  [&lt;ffffffff810e7a4c&gt;] __slab_free+0xf3/0xfe
[885412.761027]  [&lt;ffffffffa030a536&gt;] ? iscsit_release_cmd+0x208/0x217 [iscsi_target_mod]
[885412.761354]  [&lt;ffffffff810e7e95&gt;] kmem_cache_free+0x6f/0xac
[885412.761536]  [&lt;ffffffffa030a536&gt;] iscsit_release_cmd+0x208/0x217 [iscsi_target_mod]
[885412.762056]  [&lt;ffffffffa020e467&gt;] ? iblock_free_task+0x34/0x39 [target_core_iblock]
[885412.762368]  [&lt;ffffffffa0314131&gt;] lio_release_cmd+0x10/0x12 [iscsi_target_mod]
[885412.764129]  [&lt;ffffffffa02c2254&gt;] transport_release_cmd+0x2f/0x33 [target_core_mod]
[885412.805024]  [&lt;ffffffffa02c230e&gt;] transport_generic_remove+0xb6/0xc3 [target_core_mod]
[885412.806424]  [&lt;ffffffff81035b5f&gt;] ? try_to_wake_up+0x1bd/0x1bd
[885412.809033]  [&lt;ffffffffa02c241f&gt;] transport_generic_free_cmd+0x75/0x7d [target_core_mod]
[885412.810066]  [&lt;ffffffffa02c2643&gt;] transport_generic_wait_for_tasks+0x21c/0x22b [target_core_mod]
[885412.811056]  [&lt;ffffffff8139f0b1&gt;] ? mutex_lock+0x11/0x32
[885412.813059]  [&lt;ffffffff8139f0b1&gt;] ? mutex_lock+0x11/0x32
[885412.813200]  [&lt;ffffffffa030b81d&gt;] iscsit_close_connection+0x1d5/0x63a [iscsi_target_mod]
[885412.813517]  [&lt;ffffffffa0300a82&gt;] iscsit_take_action_for_connection_exit+0xdb/0xe0 [iscsi_target_mod]
[885412.813851]  [&lt;ffffffffa03111e9&gt;] iscsi_target_rx_thread+0x11f6/0x1221 [iscsi_target_mod]
[885412.829024]  [&lt;ffffffff81033e8d&gt;] ? pick_next_task_fair+0xbe/0x10e
[885412.831010]  [&lt;ffffffffa030fff3&gt;] ? iscsit_handle_scsi_cmd+0x91d/0x91d [iscsi_target_mod]
[885412.833011]  [&lt;ffffffffa030fff3&gt;] ? iscsit_handle_scsi_cmd+0x91d/0x91d [iscsi_target_mod]
[885412.835010]  [&lt;ffffffff8105388a&gt;] kthread+0x7d/0x85
[885412.837022]  [&lt;ffffffff813a7124&gt;] kernel_thread_helper+0x4/0x10
[885412.838008]  [&lt;ffffffff8105380d&gt;] ? kthread_worker_fn+0x145/0x145
[885412.840047]  [&lt;ffffffff813a7120&gt;] ? gs_change+0x13/0x13
[885412.842007] FIX lio_cmd_cache: Restoring 0xffff880000cf3750-0xffff880000cf378d=0x6

Cc: Christoph Hellwig &lt;hch@lst.de&gt;
Cc: Andy Grover &lt;agrover@redhat.com&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch fixes a bug in transport_handle_cdb_direct() usage with target_core
where transport_generic_wait_for_tasks() was bypassing active I/O + usage of
cmd-&gt;t_transport_stop_comp because cmd-&gt;t_transport_active=1 was not being set
before dispatching with transport_generic_new_cmd().  The fix follows existing
usage in transport_generic_handle_cdb*() -&gt; transport_add_cmd_to_queue() and
set these directly, as well as handle transport_generic_new_cmd() exceptions
for QUEUE_FULL and CHECK_CONDITION instead of propigating up to RX context
fabric code.

The bug was manifesting itself with the following SLUB poison overwritten
warnings with iscsi-target v4.1 LUNs using the new process context direct
operation during session reinstatement with active I/O exception handling:

[885410.498267] =============================================================================
[885410.621622] BUG lio_cmd_cache: Poison overwritten
[885410.621791] -----------------------------------------------------------------------------
[885410.621792]
[885410.623420] INFO: 0xffff880000cf3750-0xffff880000cf378d. First byte 0x6a instead of 0x6b
[885410.626332] INFO: Allocated in iscsit_allocate_cmd+0x1c/0xd4 [iscsi_target_mod] age=345 cpu=1 pid=22554
[885411.855189] INFO: Freed in iscsit_release_cmd+0x208/0x217 [iscsi_target_mod] age=1410 cpu=1 pid=22554
[885411.856048] INFO: Slab 0xffffea000002d480 objects=22 used=0 fp=0xffff880000cf7300 flags=0x4080
[885411.856368] INFO: Object 0xffff880000cf33c0 @offset=13248 fp=0xffff880000cf6780

&lt;SNIP&gt;

[885411.955678] Pid: 22554, comm: iscsi_trx Not tainted 3.0.0-rc7+ #30
[885411.956040] Call Trace:
[885411.957029]  [&lt;ffffffff810e5cf9&gt;] print_trailer+0x12e/0x137
[885412.752879]  [&lt;ffffffff810e61d9&gt;] check_bytes_and_report+0xb9/0xfd
[885412.754933]  [&lt;ffffffff810e62d2&gt;] check_object+0xb5/0x192
[885412.755099]  [&lt;ffffffff810e6445&gt;] __free_slab+0x96/0x13a
[885412.757008]  [&lt;ffffffff810e652a&gt;] discard_slab+0x41/0x43
[885412.758171]  [&lt;ffffffff810e7a4c&gt;] __slab_free+0xf3/0xfe
[885412.761027]  [&lt;ffffffffa030a536&gt;] ? iscsit_release_cmd+0x208/0x217 [iscsi_target_mod]
[885412.761354]  [&lt;ffffffff810e7e95&gt;] kmem_cache_free+0x6f/0xac
[885412.761536]  [&lt;ffffffffa030a536&gt;] iscsit_release_cmd+0x208/0x217 [iscsi_target_mod]
[885412.762056]  [&lt;ffffffffa020e467&gt;] ? iblock_free_task+0x34/0x39 [target_core_iblock]
[885412.762368]  [&lt;ffffffffa0314131&gt;] lio_release_cmd+0x10/0x12 [iscsi_target_mod]
[885412.764129]  [&lt;ffffffffa02c2254&gt;] transport_release_cmd+0x2f/0x33 [target_core_mod]
[885412.805024]  [&lt;ffffffffa02c230e&gt;] transport_generic_remove+0xb6/0xc3 [target_core_mod]
[885412.806424]  [&lt;ffffffff81035b5f&gt;] ? try_to_wake_up+0x1bd/0x1bd
[885412.809033]  [&lt;ffffffffa02c241f&gt;] transport_generic_free_cmd+0x75/0x7d [target_core_mod]
[885412.810066]  [&lt;ffffffffa02c2643&gt;] transport_generic_wait_for_tasks+0x21c/0x22b [target_core_mod]
[885412.811056]  [&lt;ffffffff8139f0b1&gt;] ? mutex_lock+0x11/0x32
[885412.813059]  [&lt;ffffffff8139f0b1&gt;] ? mutex_lock+0x11/0x32
[885412.813200]  [&lt;ffffffffa030b81d&gt;] iscsit_close_connection+0x1d5/0x63a [iscsi_target_mod]
[885412.813517]  [&lt;ffffffffa0300a82&gt;] iscsit_take_action_for_connection_exit+0xdb/0xe0 [iscsi_target_mod]
[885412.813851]  [&lt;ffffffffa03111e9&gt;] iscsi_target_rx_thread+0x11f6/0x1221 [iscsi_target_mod]
[885412.829024]  [&lt;ffffffff81033e8d&gt;] ? pick_next_task_fair+0xbe/0x10e
[885412.831010]  [&lt;ffffffffa030fff3&gt;] ? iscsit_handle_scsi_cmd+0x91d/0x91d [iscsi_target_mod]
[885412.833011]  [&lt;ffffffffa030fff3&gt;] ? iscsit_handle_scsi_cmd+0x91d/0x91d [iscsi_target_mod]
[885412.835010]  [&lt;ffffffff8105388a&gt;] kthread+0x7d/0x85
[885412.837022]  [&lt;ffffffff813a7124&gt;] kernel_thread_helper+0x4/0x10
[885412.838008]  [&lt;ffffffff8105380d&gt;] ? kthread_worker_fn+0x145/0x145
[885412.840047]  [&lt;ffffffff813a7120&gt;] ? gs_change+0x13/0x13
[885412.842007] FIX lio_cmd_cache: Restoring 0xffff880000cf3750-0xffff880000cf378d=0x6

Cc: Christoph Hellwig &lt;hch@lst.de&gt;
Cc: Andy Grover &lt;agrover@redhat.com&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>target: iscsi_target depends on NET</title>
<updated>2011-07-28T20:16:18+00:00</updated>
<author>
<name>Randy Dunlap</name>
<email>rdunlap@xenotime.net</email>
</author>
<published>2011-07-28T16:48:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=d52a10d003694e48d28cf0218db16372ed61f1bd'/>
<id>d52a10d003694e48d28cf0218db16372ed61f1bd</id>
<content type='text'>
iscsi target code uses lots on network interface functions, so it
should depend on NET.  Fixes many build errors when NET is not enabled:

ERROR: "kernel_sendmsg" [drivers/target/iscsi/iscsi_target_mod.ko] undefined!
ERROR: "in_aton" [drivers/target/iscsi/iscsi_target_mod.ko] undefined!
ERROR: "sock_release" [drivers/target/iscsi/iscsi_target_mod.ko] undefined!
ERROR: "kernel_listen" [drivers/target/iscsi/iscsi_target_mod.ko] undefined!
ERROR: "kernel_setsockopt" [drivers/target/iscsi/iscsi_target_mod.ko] undefined!
ERROR: "kernel_recvmsg" [drivers/target/iscsi/iscsi_target_mod.ko] undefined!
ERROR: "kernel_accept" [drivers/target/iscsi/iscsi_target_mod.ko] undefined!
ERROR: "sock_create" [drivers/target/iscsi/iscsi_target_mod.ko] undefined!
ERROR: "kernel_bind" [drivers/target/iscsi/iscsi_target_mod.ko] undefined!
ERROR: "in6_pton" [drivers/target/iscsi/iscsi_target_mod.ko] undefined!

Signed-off-by: Randy Dunlap &lt;rdunlap@xenotime.net&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
iscsi target code uses lots on network interface functions, so it
should depend on NET.  Fixes many build errors when NET is not enabled:

ERROR: "kernel_sendmsg" [drivers/target/iscsi/iscsi_target_mod.ko] undefined!
ERROR: "in_aton" [drivers/target/iscsi/iscsi_target_mod.ko] undefined!
ERROR: "sock_release" [drivers/target/iscsi/iscsi_target_mod.ko] undefined!
ERROR: "kernel_listen" [drivers/target/iscsi/iscsi_target_mod.ko] undefined!
ERROR: "kernel_setsockopt" [drivers/target/iscsi/iscsi_target_mod.ko] undefined!
ERROR: "kernel_recvmsg" [drivers/target/iscsi/iscsi_target_mod.ko] undefined!
ERROR: "kernel_accept" [drivers/target/iscsi/iscsi_target_mod.ko] undefined!
ERROR: "sock_create" [drivers/target/iscsi/iscsi_target_mod.ko] undefined!
ERROR: "kernel_bind" [drivers/target/iscsi/iscsi_target_mod.ko] undefined!
ERROR: "in6_pton" [drivers/target/iscsi/iscsi_target_mod.ko] undefined!

Signed-off-by: Randy Dunlap &lt;rdunlap@xenotime.net&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>target: Fix WRITE_SAME_16 lba assignment breakage</title>
<updated>2011-07-28T06:14:49+00:00</updated>
<author>
<name>Nicholas Bellinger</name>
<email>nab@linux-iscsi.org</email>
</author>
<published>2011-07-28T05:18:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=5db0753ba5aabcd9fa298029f03b32b3c96b5a39'/>
<id>5db0753ba5aabcd9fa298029f03b32b3c96b5a39</id>
<content type='text'>
This patch fixes a bug in WRITE_SAME_16 LBA assignment where get_unaligned_be16()
is incorrectly being used instead of get_unaligned_be64() for a 64-bit LBA.

This was introduced with:

commit a1d8b49abd60ba5d09e7c968731abcb0f8f1cbf6
Author: Andy Grover &lt;agrover@redhat.com&gt;
Date:   Mon May 2 17:12:10 2011 -0700

    target: Updates from AGrover and HCH (round 3)

    (target: inline struct se_transport_task into struct se_cmd)

Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch fixes a bug in WRITE_SAME_16 LBA assignment where get_unaligned_be16()
is incorrectly being used instead of get_unaligned_be64() for a 64-bit LBA.

This was introduced with:

commit a1d8b49abd60ba5d09e7c968731abcb0f8f1cbf6
Author: Andy Grover &lt;agrover@redhat.com&gt;
Date:   Mon May 2 17:12:10 2011 -0700

    target: Updates from AGrover and HCH (round 3)

    (target: inline struct se_transport_task into struct se_cmd)

Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>iscsi-target: Fix CONFIG_SMP=n and CONFIG_MODULES=n build failure</title>
<updated>2011-07-27T20:28:49+00:00</updated>
<author>
<name>Nicholas Bellinger</name>
<email>nab@linux-iscsi.org</email>
</author>
<published>2011-07-27T20:13:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=aadcec010127a20599500c7007fbe9998744be41'/>
<id>aadcec010127a20599500c7007fbe9998744be41</id>
<content type='text'>
This patch fixes the following CONFIG_SMP=n and CONFIG_MODULES=n build
failure, because iscsit_thread_get_cpumask() is defined as a macro in
iscsi_target.c, but needed by iscsi_target_login.c

drivers/built-in.o: In function `iscsi_post_login_handler':
iscsi_target_login.c:(.text+0x13a315): undefined reference to `iscsit_thread_get_cpumask'
iscsi_target_login.c:(.text+0x13a4b4): undefined reference to `iscsit_thread_get_cpumask'
make: *** [.tmp_vmlinux1] Error 1

Reported-by: Randy Dunlap &lt;rdunlap@xenotime.net&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch fixes the following CONFIG_SMP=n and CONFIG_MODULES=n build
failure, because iscsit_thread_get_cpumask() is defined as a macro in
iscsi_target.c, but needed by iscsi_target_login.c

drivers/built-in.o: In function `iscsi_post_login_handler':
iscsi_target_login.c:(.text+0x13a315): undefined reference to `iscsit_thread_get_cpumask'
iscsi_target_login.c:(.text+0x13a4b4): undefined reference to `iscsit_thread_get_cpumask'
make: *** [.tmp_vmlinux1] Error 1

Reported-by: Randy Dunlap &lt;rdunlap@xenotime.net&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>iscsi-target: Fix snprintf usage with MAX_PORTAL_LEN</title>
<updated>2011-07-27T20:28:38+00:00</updated>
<author>
<name>Nicholas Bellinger</name>
<email>nab@linux-iscsi.org</email>
</author>
<published>2011-07-27T19:37:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=7bbb654e9c77a8692425dbd2c704ad245b86ec8a'/>
<id>7bbb654e9c77a8692425dbd2c704ad245b86ec8a</id>
<content type='text'>
This patch makes lio_target_call_addnptotpg() use sprintf() with
MAX_PORTAL_LEN + 1 to address the following smatch warning:

drivers/target/iscsi/iscsi_target_configfs.c +184 lio_target_call_addnptotpg(21)
        error: snprintf() chops off the last chars of 'name': 257 vs 256

Reported-by: Dan Carpenter &lt;error27@gmail.com&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch makes lio_target_call_addnptotpg() use sprintf() with
MAX_PORTAL_LEN + 1 to address the following smatch warning:

drivers/target/iscsi/iscsi_target_configfs.c +184 lio_target_call_addnptotpg(21)
        error: snprintf() chops off the last chars of 'name': 257 vs 256

Reported-by: Dan Carpenter &lt;error27@gmail.com&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>iscsi-target: Fix uninitialized usage of cmd-&gt;pad_bytes</title>
<updated>2011-07-27T20:28:31+00:00</updated>
<author>
<name>Nicholas Bellinger</name>
<email>nab@linux-iscsi.org</email>
</author>
<published>2011-07-27T19:16:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=76f1928e8831961a692459924cfac0ca1b0d303a'/>
<id>76f1928e8831961a692459924cfac0ca1b0d303a</id>
<content type='text'>
This patch fixes an uninitialized usage of cmd-&gt;pad_bytes inside of
iscsit_handle_text_cmd() introduced during a v4.1 change to use cmd
members instead of local pad_bytes variables.

Reported-by: Dan Carpenter &lt;error27@gmail.com&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch fixes an uninitialized usage of cmd-&gt;pad_bytes inside of
iscsit_handle_text_cmd() introduced during a v4.1 change to use cmd
members instead of local pad_bytes variables.

Reported-by: Dan Carpenter &lt;error27@gmail.com&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>iscsi-target: strlen() doesn't count the terminator</title>
<updated>2011-07-27T20:28:16+00:00</updated>
<author>
<name>Dan Carpenter</name>
<email>error27@gmail.com</email>
</author>
<published>2011-07-27T11:11:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=8f50c7f5d63b0e4a29f6f96e8cfaca782e0c458d'/>
<id>8f50c7f5d63b0e4a29f6f96e8cfaca782e0c458d</id>
<content type='text'>
This patch fixes an off by one check in iscsit_add_tiqn() because the
NULL terminator isn't taken into consideration.

Signed-off-by: Dan Carpenter &lt;error27@gmail.com&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch fixes an off by one check in iscsit_add_tiqn() because the
NULL terminator isn't taken into consideration.

Signed-off-by: Dan Carpenter &lt;error27@gmail.com&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>iscsi-target: Fix NULL dereference on allocation failure</title>
<updated>2011-07-27T20:28:04+00:00</updated>
<author>
<name>Dan Carpenter</name>
<email>error27@gmail.com</email>
</author>
<published>2011-07-27T09:58:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=4a28a3fa8c37193b105807193b3695048f0050a4'/>
<id>4a28a3fa8c37193b105807193b3695048f0050a4</id>
<content type='text'>
This patch fixes a bug in iscsi_target_init_negotiation() where
the "goto out" path dereferences "login" which is NULL upon a
memory allocation failure.

Signed-off-by: Dan Carpenter &lt;error27@gmail.com&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch fixes a bug in iscsi_target_init_negotiation() where
the "goto out" path dereferences "login" which is NULL upon a
memory allocation failure.

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