Re: [PATCH 2/2] target: Fix target_wait_for_sess_cmds breakage with active signals

2018-10-10 Thread Nicholas A. Bellinger
Hello MNC & Co, On Wed, 2018-10-10 at 11:58 -0500, Mike Christie wrote: > On 10/09/2018 10:23 PM, Nicholas A. Bellinger wrote: > > From: Nicholas Bellinger > > > > With the addition of commit 00d909a107 in v4.19-rc, it incorrectly assumes > > no > > si

Re: [PATCH 2/2] target: Fix target_wait_for_sess_cmds breakage with active signals

2018-10-10 Thread Nicholas A. Bellinger
Hey Peter & Co, On Wed, 2018-10-10 at 10:43 +0200, Peter Zijlstra wrote: > On Wed, Oct 10, 2018 at 03:23:10AM +, Nicholas A. Bellinger wrote: > > From: Nicholas Bellinger > > > > With the addition of commit 00d909a107 in v4.19-rc, it incorrectly assumes > >

[GIT PULL] target updates for v4.16-rc1

2018-02-09 Thread Nicholas A. Bellinger
Hi Linus, Here are the target-pending updates for v4.16-rc1. Please go ahead and pull from: git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending.git for-next The highlights include: - Numerous target-core-user improvements related to queue full and timeout handling. (MNC) - Prev

Re: [PATCH] tcmu: Fix trailing semicolon

2018-01-18 Thread Nicholas A. Bellinger
On Tue, 2018-01-16 at 10:25 -0600, Michael Christie wrote: > On 01/16/2018 09:34 AM, Luis de Bethencourt wrote: > > The trailing semicolon is an empty statement that does no operation. > > It is completely stripped out by the compiler. Removing it since it doesn't > > do > > anything. > > > > Sig

Re: [PATCH] target-core: don't use "const char*" for a buffer that is written to

2018-01-12 Thread Nicholas A. Bellinger
Hi Rasmus, Apologies for the delayed follow-up on this. On Tue, 2017-11-21 at 01:12 +0100, Rasmus Villemoes wrote: > From: Rasmus Villemoes > > iscsi_parse_pr_out_transport_id launders the const away via a call to > strstr(), and then modifies the buffer (writing a nul byte) through > the retur

Re: [PATCH] target: don't call an unmap callback if a range length is zero

2018-01-12 Thread Nicholas A. Bellinger
Hi Andrei, Apologies for the delayed follow up. On Wed, 2017-12-13 at 13:55 -0800, Andrei Vagin wrote: > If a length of a range is zero, it means there is nothing to unmap > and we can skip this range. > > Here is one more reason, why we have to skip such ranges. An unmap > callback calls file_

[GIT PULL] target updates for v4.15-rc1

2017-11-23 Thread Nicholas A. Bellinger
Hello Linus, Here are the target-pending updates for v4.15-rc1. Please go ahead and pull from: git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending.git for-next This series is predominantly bug-fixes, with a few small improvements that have been outstanding over the last release c

[PATCH 0/6] target fixes for v4.15-rc1

2017-11-07 Thread Nicholas A. Bellinger
From: Nicholas Bellinger Hi all, Here are the outstanding target bugfixes in queue for v4.15-rc1 code. Patch #1 addresses a long standing bug wrt to QUEUE_FULL and SCSI task attribute handling, that results in SCSI task related counters getting updated multiple times during QUEUE_FULL. It prim

[PATCH 6/6] iscsi-target: Fix non-immediate TMR reference leak

2017-11-07 Thread Nicholas A. Bellinger
From: Nicholas Bellinger This patch fixes a se_cmd->cmd_kref reference leak that can occur when a non immediate TMR is proceeded our of command sequence number order, and CMDSN_LOWER_THAN_EXP is returned by iscsit_sequence_cmd(). To address this bug, call target_put_sess_cmd() during this specia

[PATCH 1/6] target: Fix QUEUE_FULL + SCSI task attribute handling

2017-11-07 Thread Nicholas A. Bellinger
From: Nicholas Bellinger This patch fixes a bug during QUEUE_FULL where transport_complete_qf() calls transport_complete_task_attr() after it's already been invoked by target_complete_ok_work() or transport_generic_request_failure() during initial completion, preceeding QUEUE_FULL. This will res

[PATCH 4/6] target: Avoid early CMD_T_PRE_EXECUTE failures during ABORT_TASK

2017-11-07 Thread Nicholas A. Bellinger
From: Nicholas Bellinger This patch fixes bug where early se_cmd exceptions that occur before backend execution can result in use-after-free if/when a subsequent ABORT_TASK occurs for the same tag. Since an early se_cmd exception will have had se_cmd added to se_session->sess_cmd_list via target

[PATCH 3/6] target: Fix quiese during transport_write_pending_qf endless loop

2017-11-07 Thread Nicholas A. Bellinger
From: Nicholas Bellinger This patch fixes a potential end-less loop during QUEUE_FULL, where cmd->se_tfo->write_pending() callback fails repeatedly but __transport_wait_for_tasks() has already been invoked to quiese the outstanding se_cmd descriptor. To address this bug, this patch adds a CMD_T_

[PATCH 2/6] target: Fix caw_sem leak in transport_generic_request_failure

2017-11-07 Thread Nicholas A. Bellinger
From: Nicholas Bellinger With the recent addition of transport_check_aborted_status() within transport_generic_request_failure() to avoid sending a SCSI status exception after CMD_T_ABORTED w/ TAS=1 has occured, it introduced a COMPARE_AND_WRITE early failure regression. Namely when COMPARE_AND_

[PATCH 5/6] iscsi-target: Make TASK_REASSIGN use proper se_cmd->cmd_kref

2017-11-07 Thread Nicholas A. Bellinger
From: Nicholas Bellinger Since commit 59b6986dbf fixed a potential NULL pointer dereference by allocating a se_tmr_req for ISCSI_TM_FUNC_TASK_REASSIGN, the se_tmr_req is currently leaked by iscsit_free_cmd() because no iscsi_cmd->se_cmd.se_tfo was associated. To address this, treat ISCSI_TM_FUNC

[GIT PULL] target fixes for v4.13-rc5

2017-08-12 Thread Nicholas A. Bellinger
Hi Linus, Here are the target-pending fixes for v4.13-rc5. Please go ahead and pull from: git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending.git master The highlights include: - Fix iscsi-target payload memory leak during ISCSI_FLAG_TEXT_CONTINUE (Varun Prakash) - Fix tcm_qla

[PATCH] iscsi-target: Fix iscsi_np reset hung task during parallel delete

2017-08-06 Thread Nicholas A. Bellinger
From: Nicholas Bellinger This patch fixes a bug associated with iscsit_reset_np_thread() that can occur during parallel configfs rmdir of a single iscsi_np used across multiple iscsi-target instances, that would result in hung task(s) similar to below where configfs rmdir process context was bloc

[PATCH] qla2xxx: Fix incorrect tcm_qla2xxx_free_cmd use during TMR ABORT (v2)

2017-07-30 Thread Nicholas A. Bellinger
From: Nicholas Bellinger This patch drops two incorrect usages of tcm_qla2xxx_free_cmd() during TMR ABORT within tcm_qla2xxx_handle_data_work() and tcm_qla2xxx_aborted_task(), which where attempting to dispatch into workqueue context to do tcm_qla2xxx_complete_free() and subsequently invoke trans

[GIT PULL] target updates for v4.13-rc1

2017-07-13 Thread Nicholas A. Bellinger
Hi Linus, Here are the target-pending updates for v4.13-rc1. Please go ahead and pull from: git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending.git for-next Note there is a qla2xxx conflict with scsi.git as reported by SFR, which should be straight-forward to resolve: https://lk

Re: [PATCH] iscsi-target: Reject immediate data underflow larger than SCSI transfer length

2017-07-13 Thread Nicholas A. Bellinger
On Tue, 2017-07-11 at 16:17 +, Bart Van Assche wrote: > On Tue, 2017-07-11 at 00:22 -0700, Nicholas A. Bellinger wrote: > > So rejecting this case as already done in commit abb85a9b51 is the > > correct approach for >= v4.3.y. > > Hello Nic, > > I hope t

Re: [PATCH] iscsi-target: Add login_keys_workaround attribute for non RFC initiators

2017-07-11 Thread Nicholas A. Bellinger
On Tue, 2017-07-11 at 23:38 +, Bart Van Assche wrote: > On Fri, 2017-07-07 at 22:24 +0000, Nicholas A. Bellinger wrote: > > From: Nicholas Bellinger > > > > This patch re-introduces part of a long standing login workaround that > > was recently dr

Re: [PATCH] iscsi-target: Add login_keys_workaround attribute for non RFC initiators

2017-07-11 Thread Nicholas A. Bellinger
Hey Robert, Any chance to test this with your Flexboot PXE setup..? Please give this a spin ASAP to verify it addresses the regression you reported earlier, wrt FirstBurstLength not being proposed nor responded to using Flexboot PXE. Thank you. On Fri, 2017-07-07 at 22:24 +, Nicholas A

Re: [PATCH] iscsi-target: Reject immediate data underflow larger than SCSI transfer length

2017-07-11 Thread Nicholas A. Bellinger
Hi Bart, On Thu, 2017-06-08 at 23:55 -0700, Nicholas A. Bellinger wrote: > On Thu, 2017-06-08 at 15:37 +, Bart Van Assche wrote: > > On Thu, 2017-06-08 at 04:21 +, Nicholas A. Bellinger wrote: > > > + /* > > > + * Check for underflow case where both EDTL

[PATCH] iscsi-target: Add login_keys_workaround attribute for non RFC initiators

2017-07-07 Thread Nicholas A. Bellinger
From: Nicholas Bellinger This patch re-introduces part of a long standing login workaround that was recently dropped by: commit 1c99de981f30b3e7868b8d20ce5479fa1c0fea46 Author: Nicholas Bellinger Date: Sun Apr 2 13:36:44 2017 -0700 iscsi-target: Drop work-around for legacy Global

Re: [PATCH] target: make device_mutex and device_list static

2017-07-06 Thread Nicholas A. Bellinger
On Wed, 2017-07-05 at 13:15 -0500, Mike Christie wrote: > On 07/04/2017 03:44 AM, Colin King wrote: > > From: Colin Ian King > > > > Variables device_mutex and device_list static are local to the source, > > so make them static. > > > > Cleans up sparse warnings: > > "symbol 'device_list' was no

Re: [kernel-hardening] Re: [PATCH v4 06/13] iscsi: ensure RNG is seeded before use

2017-06-29 Thread Nicholas A. Bellinger
On Mon, 2017-06-26 at 19:38 +0200, Stephan Müller wrote: > Am Montag, 26. Juni 2017, 03:23:09 CEST schrieb Nicholas A. Bellinger: > > Hi Nicholas, > > > Hi Stephan, Lee & Jason, > > > > (Adding target-devel CC') > > > > Apologies for coming l

Re: [PATCH] ib_isert: prevent NULL pointer dereference in isert_login_recv_done()

2017-06-29 Thread Nicholas A. Bellinger
On Thu, 2017-06-29 at 11:28 +0300, Sagi Grimberg wrote: > >> Can you test just the one liner fix below? > >> > @@ -1452,7 +1452,7 @@ > isert_login_recv_done(struct ib_cq *cq, struct ib_wc *wc) > { > struct isert_conn *isert_conn = wc->qp->qp_context; > -

Re: [kernel-hardening] Re: [PATCH v4 06/13] iscsi: ensure RNG is seeded before use

2017-06-25 Thread Nicholas A. Bellinger
Hi Stephan, Lee & Jason, (Adding target-devel CC') Apologies for coming late to the discussion. Comments below. On Sun, 2017-06-18 at 10:04 +0200, Stephan Müller wrote: > Am Samstag, 17. Juni 2017, 05:45:57 CEST schrieb Lee Duncan: > > Hi Lee, > > > In your testing, how long might a process h

Re: [PATCH] ib_isert: prevent NULL pointer dereference in isert_login_recv_done() (was: Re: NULL pointer dereference in isert_login_recv_done in 4.9.32)

2017-06-25 Thread Nicholas A. Bellinger
Hi Andrea & Robert, (Adding HCH CC') On Fri, 2017-06-23 at 00:37 +0200, Andrea Righi wrote: > On Wed, Jun 21, 2017 at 10:33:45AM -0600, Robert LeBlanc wrote: > > On Wed, Jun 21, 2017 at 9:17 AM, Robert LeBlanc > > wrote: > > > On Tue, Jun 20, 2017 at 12:54 PM, Robert LeBlanc > > > wrote: > >

Re: [PATCH][V2][target-devel-next] tcmu: make array tcmu_attrib_attrs static const

2017-06-25 Thread Nicholas A. Bellinger
On Tue, 2017-06-13 at 14:29 +0100, Colin King wrote: > From: Colin Ian King > > The array tcmu_attrib_attrs does not need to be in global scope, so make > it static. > > Cleans up sparse warning: > "symbol 'tcmu_attrib_attrs' was not declared. Should it be static?" > > Signed-off-by: Colin Ian

[GIT PULL] target fixes for v4.12-rc7

2017-06-24 Thread Nicholas A. Bellinger
Hi Linus, Here are the target-pending fixes for v4.12-rc7 that have been queued up for the last 2 weeks. Please go ahead and pull from: git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending.git master This includes: - Fix a TMR related kref underflow detected by the recent refcoun

Re: [PATCH] configfs: Fix race between create_link and configfs_rmdir

2017-06-09 Thread Nicholas A. Bellinger
On Thu, 2017-06-08 at 07:34 -0500, Bryant G. Ly wrote: > > Thanks Nic, > > > > applied to the configfs-for-next tree. I'm not entirely sure if we > > should bother adding this to 4.12 or if it hits rarely enough? > > > It hits for us pretty often when we have a GPFS setup with 10 hosts and 1k+ >

Re: [PATCH] iscsi-target: Reject immediate data underflow larger than SCSI transfer length

2017-06-08 Thread Nicholas A. Bellinger
On Thu, 2017-06-08 at 15:37 +, Bart Van Assche wrote: > On Thu, 2017-06-08 at 04:21 +0000, Nicholas A. Bellinger wrote: > > + /* > > +* Check for underflow case where both EDTL and immediate data payload > > +* exceeds what is presented by CDB's TRA

Re: [PATCH 2/3] target: Add TARGET_SCF_LOOKUP_LUN_FROM_TAG support for ABORT_TASK

2017-06-08 Thread Nicholas A. Bellinger
On Mon, 2017-06-05 at 15:57 +, Bart Van Assche wrote: > On Sat, 2017-06-03 at 22:10 +0000, Nicholas A. Bellinger wrote: > > +static bool target_lookup_lun_from_tag(struct se_session *se_sess, u64 tag, > > + u64 *unpacked_lun) > > +{

Re: [PATCH 0/3] target: Add TARGET_SCF_LOOKUP_LUN_FROM_TAG support

2017-06-08 Thread Nicholas A. Bellinger
Hi Himanshu & Quinn, On Wed, 2017-06-07 at 05:02 +, Madhani, Himanshu wrote: > > On Jun 3, 2017, at 3:10 PM, Nicholas A. Bellinger > > wrote: > > > > From: Nicholas Bellinger > > > > Hi Himanshu + Quinn, > > > > Here is a sma

Re: [PATCH] iscsi-target: Fix delayed logout processing greater than SECONDS_FOR_LOGOUT_COMP

2017-06-08 Thread Nicholas A. Bellinger
Reviews pretty please..? On Sat, 2017-06-03 at 21:32 +, Nicholas A. Bellinger wrote: > From: Nicholas Bellinger > > This patch fixes a BUG() in iscsit_close_session() that could be > triggered when iscsit_logout_post_handler() execution from within > tx thread context was n

Re: [PATCH] target: Fix kref->refcount underflow in transport_cmd_finish_abort

2017-06-08 Thread Nicholas A. Bellinger
(Adding Quinn CC') Reviews please..? On Sat, 2017-06-03 at 21:09 +0000, Nicholas A. Bellinger wrote: > From: Nicholas Bellinger > > This patch fixes a se_cmd->cmd_kref underflow during CMD_T_ABORTED > when a fabric driver drops it's second reference from below the

[PATCH] configfs: Fix race between create_link and configfs_rmdir

2017-06-07 Thread Nicholas A. Bellinger
From: Nicholas Bellinger This patch closes a long standing race in configfs between the creation of a new symlink in create_link(), while the symlink target's config_item is being concurrently removed via configfs_rmdir(). This can happen because the symlink target's reference is obtained by con

[PATCH] iscsi-target: Reject immediate data underflow larger than SCSI transfer length

2017-06-07 Thread Nicholas A. Bellinger
From: Nicholas Bellinger When iscsi WRITE underflow occurs there are two different scenarios that can happen. Normally in practice, when an EDTL vs. SCSI CDB TRANSFER LENGTH underflow is detected, the iscsi immediate data payload is the smaller SCSI CDB TRANSFER LENGTH. That is, when a host fab

[PATCH 0/3] target: Add TARGET_SCF_LOOKUP_LUN_FROM_TAG support

2017-06-03 Thread Nicholas A. Bellinger
From: Nicholas Bellinger Hi Himanshu + Quinn, Here is a small series to introduce proper percpu se_lun->lun_ref counting for TMR, and add common code in target_submit_tmr() to do tag lookup for unpacked_lun in order to drop the original driver specific lookup within __qlt_24xx_handle_abts(). It

[PATCH 1/3] target: Add support for TMR percpu reference counting

2017-06-03 Thread Nicholas A. Bellinger
From: Nicholas Bellinger This patch introduces TMR percpu reference counting using se_lun->lun_ref in transport_lookup_tmr_lun(), following how existing non TMR per se_lun reference counting works within transport_lookup_cmd_lun(). It also adds explicit transport_lun_remove_cmd() calls to drop t

[PATCH 3/3] qla2xxx: Convert QLA_TGT_ABTS to TARGET_SCF_LOOKUP_LUN_FROM_TAG

2017-06-03 Thread Nicholas A. Bellinger
From: Nicholas Bellinger Following Himanshu's earlier patch to drop the redundant tag lookup within __qlt_24xx_handle_abts(), go ahead and drop this now QLA_TGT_ABTS can use TARGET_SCF_LOOKUP_LUN_FROM_TAG and have target_submit_tmr() do this from common code. Cc: Himanshu Madhani Cc: Quinn Tran

[PATCH 2/3] target: Add TARGET_SCF_LOOKUP_LUN_FROM_TAG support for ABORT_TASK

2017-06-03 Thread Nicholas A. Bellinger
From: Nicholas Bellinger This patch introduces support in target_submit_tmr() for locating a unpacked_lun from an existing se_cmd->tag during ABORT_TASK. When TARGET_SCF_LOOKUP_LUN_FROM_TAG is set, target_submit_tmr() will do the extra lookup via target_lookup_lun_from_tag() and subsequently inv

[PATCH] iscsi-target: Fix delayed logout processing greater than SECONDS_FOR_LOGOUT_COMP

2017-06-03 Thread Nicholas A. Bellinger
From: Nicholas Bellinger This patch fixes a BUG() in iscsit_close_session() that could be triggered when iscsit_logout_post_handler() execution from within tx thread context was not run for more than SECONDS_FOR_LOGOUT_COMP (15 seconds), and the TCP connection didn't already close before then for

[PATCH] target: Fix kref->refcount underflow in transport_cmd_finish_abort

2017-06-03 Thread Nicholas A. Bellinger
From: Nicholas Bellinger This patch fixes a se_cmd->cmd_kref underflow during CMD_T_ABORTED when a fabric driver drops it's second reference from below the target_core_tmr.c based callers of transport_cmd_finish_abort(). Recently with the conversion of kref to refcount_t, this bug was manifestin

Re: linux-next: upcoming conflict between the target-updates and target-bva trees

2017-06-01 Thread Nicholas A. Bellinger
On Fri, 2017-06-02 at 13:39 +1000, Stephen Rothwell wrote: > Hi all, > > Last night the tagret-bva tree was rebased on top of the target-updates > tree. Just now, part of the target-updates tree has been rewritten. > So now I expect to get conflict(s) when I merge these trees since the > commits

Re: linux-next: manual merge of the target-bva tree with the target-updates tree

2017-06-01 Thread Nicholas A. Bellinger
On Thu, 2017-06-01 at 14:14 -0700, Bart Van Assche wrote: > On 05/31/17 22:04, Nicholas A. Bellinger wrote: > > Go ahead and get list review on drivers/target/ changes before pushing > > them into linux-next, please. > > > > Btw, I don't care if you queue up

Re: [PATCH] iscsi: Fix a sleep-in-atomic bug

2017-06-01 Thread Nicholas A. Bellinger
On Fri, 2017-06-02 at 09:13 +0800, Jia-Ju Bai wrote: > On 06/01/2017 02:21 PM, Nicholas A. Bellinger wrote: > > Hi Jia-Ju, > > > > On Wed, 2017-05-31 at 11:26 +0800, Jia-Ju Bai wrote: > >> The driver may sleep under a spin lock, and the function call path is: >

[PATCH-v2] target: Avoid target_shutdown_sessions loop during queue_depth change

2017-06-01 Thread Nicholas A. Bellinger
From: Nicholas Bellinger When target_shutdown_sessions() is invoked to shutdown all active sessions associated with a se_node_acl when se_node_acl->queue_depth is changed via core_tpg_set_initiator_node_queue_depth(), it's possible that new connections reconnect immediately after explicit shutdow

[PATCH 2/2] target/configfs: Kill se_lun->lun_link_magic

2017-06-01 Thread Nicholas A. Bellinger
From: Nicholas Bellinger Instead of using a hardcoded magic value in se_lun when verifying a target config_item symlink source during target_fabric_mappedlun_link(), go ahead and use target_fabric_port_item_ops directly instead. Cc: Christoph Hellwig Cc: Mike Christie Cc: Hannes Reinecke Sign

[PATCH 1/2] target/configfs: Kill se_device->dev_link_magic

2017-06-01 Thread Nicholas A. Bellinger
From: Nicholas Bellinger Instead of using a hardcoded magic value in se_device when verifying a target config_item symlink source during target_fabric_port_link(), go ahead and use target_core_dev_item_ops directly instead. Cc: Christoph Hellwig Cc: Mike Christie Cc: Hannes Reinecke Signed-of

Re: [PATCH] target: Avoid target_shutdown_sessions loop during queue_depth change

2017-06-01 Thread Nicholas A. Bellinger
On Thu, 2017-06-01 at 08:57 +0200, Christoph Hellwig wrote: > How about this slightly easier to read version? Fine by me. Applied.

[PATCH-v2] target/iblock: Convert WRITE_SAME to blkdev_issue_zeroout

2017-06-01 Thread Nicholas A. Bellinger
From: Nicholas Bellinger The people who are actively using iblock_execute_write_same_direct() are doing so in the context of ESX VAAI BlockZero, together with EXTENDED_COPY and COMPARE_AND_WRITE primitives. In practice though I've not seen any users of IBLOCK WRITE_SAME for anything other than V

[PATCH] target: Avoid target_shutdown_sessions loop during queue_depth change

2017-05-31 Thread Nicholas A. Bellinger
From: Nicholas Bellinger When target_shutdown_sessions() is invoked to shutdown all active sessions associated with a se_node_acl when se_node_acl->queue_depth is changed via core_tpg_set_initiator_node_queue_depth(), it's possible that new connections reconnect immediately after explicit shutdow

Re: [PATCH] iscsi: Fix a sleep-in-atomic bug

2017-05-31 Thread Nicholas A. Bellinger
Hi Jia-Ju, On Wed, 2017-05-31 at 11:26 +0800, Jia-Ju Bai wrote: > The driver may sleep under a spin lock, and the function call path is: > iscsit_tpg_enable_portal_group (acquire the lock by spin_lock) > iscsi_update_param_value > kstrdup(GFP_KERNEL) --> may sleep > > To fix it, the "GFP_KE

Re: [PATCH] tcmu: Add fifo type waiter list support to avoid starvation

2017-05-31 Thread Nicholas A. Bellinger
Hey MNC, Any comments on this..? It's been sitting on the list for a while now.. ;) On Fri, 2017-05-05 at 10:51 +0800, lixi...@cmss.chinamobile.com wrote: > From: Xiubo Li > > The fifo type waiter list will hold the udevs who are waiting for the > blocks from the data global pool. The unmap t

Re: linux-next: manual merge of the target-bva tree with the target-updates tree

2017-05-31 Thread Nicholas A. Bellinger
On Thu, 2017-06-01 at 05:05 +, Bart Van Assche wrote: > On Wed, 2017-05-31 at 21:27 -0700, Nicholas A. Bellinger wrote: > > but a weeks worth of list silence for your series doesn't mean > > you're free to push un-reviewed stuff for drivers/target/ into > > linu

Re: linux-next: manual merge of the target-bva tree with the target-updates tree

2017-05-31 Thread Nicholas A. Bellinger
On Thu, 2017-06-01 at 04:59 +, Bart Van Assche wrote: > On Thu, 2017-06-01 at 14:10 +1000, Stephen Rothwell wrote: > > Hi Bart, > > > > Today's linux-next merge of the target-bva tree got a conflict in: > > > > drivers/target/target_core_transport.c > > > > between commit: > > > > 4ff83

Re: linux-next: manual merge of the target-bva tree with the target-updates tree

2017-05-31 Thread Nicholas A. Bellinger
On Thu, 2017-06-01 at 14:10 +1000, Stephen Rothwell wrote: > Hi Bart, > > Today's linux-next merge of the target-bva tree got a conflict in: > > drivers/target/target_core_transport.c > > between commit: > > 4ff83daa0200 ("target: Re-add check to reject control WRITEs with overflow > data"

[GIT PULL] target fixes for v4.12-rc4

2017-05-31 Thread Nicholas A. Bellinger
Hello Linus, Here are the target-pending fixes for v4.12-rc4. Please go ahead and pull from: git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending.git master This includes: - ibmviscsis ABORT_TASK handling fixes that missed the v4.12 merge window. (Bryant Ly and Michael Cyr

Re: [PATCH] iscsi-target: Fix initial login PDU asynchronous socket close OOPs

2017-05-31 Thread Nicholas A. Bellinger
On Wed, 2017-05-31 at 15:28 -0500, Mike Christie wrote: > On 05/30/2017 11:58 PM, Nicholas A. Bellinger wrote: > > Hey MNC, > > > > On Fri, 2017-05-26 at 22:14 -0500, Mike Christie wrote: > >> Thanks for the patch. > >> The patch fixes the cra

Re: [PATCH] iscsi-target: Fix initial login PDU asynchronous socket close OOPs

2017-05-30 Thread Nicholas A. Bellinger
05/26/2017 12:32 AM, Nicholas A. Bellinger wrote: > > > > - state = iscsi_target_sk_state_check(sk); > > - write_unlock_bh(&sk->sk_callback_lock); > > - > > - pr_debug("iscsi_target_sk_state_change: state: %d\n", state); > > + ori

[PATCH] iscsi-target: Fix initial login PDU asynchronous socket close OOPs

2017-05-25 Thread Nicholas A. Bellinger
From: Nicholas Bellinger This patch fixes a OOPs originally introduced by: commit bb048357dad6d604520c91586334c9c230366a14 Author: Nicholas Bellinger Date: Thu Sep 5 14:54:04 2013 -0700 iscsi-target: Add sk->sk_state_change to cleanup after TCP failure which would trigger a NULL

Re: [RESEND PATCH] vhost/scsi: Don't reinvent the wheel but use existing llist API

2017-05-23 Thread Nicholas A. Bellinger
On Fri, 2017-05-12 at 09:42 +0900, Byungchul Park wrote: > Although llist provides proper APIs, they are not used. Make them used. > > Signed-off-by: Byungchul Park > Acked-by: Nicholas Bellinger > --- > drivers/vhost/scsi.c | 11 +++ > 1 file changed, 3 insertions(+), 8 deletions(-) >

Re: [PATCH] target: remove dead code

2017-05-23 Thread Nicholas A. Bellinger
On Thu, 2017-05-11 at 13:39 -0700, Tyrel Datwyler wrote: > On 05/09/2017 02:46 PM, Gustavo A. R. Silva wrote: > > Local variable _ret_ is assigned to a constant value and it is never > > updated again. Remove this variable and the dead code it guards. > > > > Addresses-Coverity-ID: 140761 > > Sign

[GIT PULL] target updates for v4.12-rc1

2017-05-11 Thread Nicholas A. Bellinger
Hi Linus, Here are the target-pending updates for v4.12-rc1. Please go ahead and pull from: git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending.git for-next Things where alot more calm than previously expected. It's primarily fixes in various areas, with most of the new function

[PATCH] target: Re-add check to reject control WRITEs with overflow data

2017-05-11 Thread Nicholas A. Bellinger
From: Nicholas Bellinger During v4.3 when the overflow/underflow check was relaxed by commit c72c525022: commit c72c5250224d475614a00c1d7e54a67f77cd3410 Author: Roland Dreier Date: Wed Jul 22 15:08:18 2015 -0700 target: allow underflow/overflow for PR OUT etc. commands to allow

[PATCH 3/3] target: Don't force session reset if queue_depth does not change

2017-05-02 Thread Nicholas A. Bellinger
From: Nicholas Bellinger Keeping in the idempotent nature of target_core_fabric_configfs.c, if a queue_depth value is set and it's the same as the existing value, don't attempt to force session reinstatement. Reported-by: Raghu Krishnamurthy Cc: Raghu Krishnamurthy Tested-by: Gary Guo Cc: Gar

[PATCH 0/3] target: Fixes for v4.12-rc1

2017-05-02 Thread Nicholas A. Bellinger
From: Nicholas Bellinger Hi all, Here are a couple of fixes from the last weeks testing while continuing longevity and scale out workloads on v4.x target code. This series contains three patches. The first is to address a COMPARE_AND_WRITE se_cmd reference leak where the READ phase hits a non

[PATCH 1/3] target: Fix compare_and_write_callback handling for non GOOD status

2017-05-02 Thread Nicholas A. Bellinger
From: Nicholas Bellinger Following the bugfix for handling non SAM_STAT_GOOD COMPARE_AND_WRITE status during COMMIT phase in commit 9b2792c3da1, the same bug exists for the READ phase as well. This would manifest first as a lost SCSI response, and eventual hung task during fabric driver logout o

[PATCH 2/3] iscsi-target: Set session_fall_back_to_erl0 when forcing reinstatement

2017-05-02 Thread Nicholas A. Bellinger
From: Nicholas Bellinger While testing modification of per se_node_acl queue_depth forcing session reinstatement via lio_target_nacl_cmdsn_depth_store() -> core_tpg_set_initiator_node_queue_depth(), a hung task bug triggered when changing cmdsn_depth invoked session reinstatement while an iscsi l

Re: [PATCH] tcmu: Recalculate the tcmu_cmd size to save cmd area memories

2017-05-02 Thread Nicholas A. Bellinger
On Tue, 2017-05-02 at 21:06 -0500, Mike Christie wrote: > On 05/02/2017 02:54 AM, lixi...@cmss.chinamobile.com wrote: > > From: Xiubo Li > > > > For the "struct tcmu_cmd_entry" in cmd area, the minimum size > > will be sizeof(struct tcmu_cmd_entry) == 112 Bytes. And it could > > fill about (sizeo

Re: [PATCH v7 0/2] tcmu: Dynamic growing data area support

2017-05-01 Thread Nicholas A. Bellinger
On Tue, 2017-05-02 at 11:38 +0800, lixi...@cmss.chinamobile.com wrote: > From: Xiubo Li > > Changed for V7: > - #1 fix two issues. > - #2 fix kbuild warning and some issues. > > Changed for V6: > - Remove the tcmu_vma_close(). Since the unmap thread will do the same for it > - The unmap thread

Re: [PATCH v6 2/2] tcmu: Add global data block pool support

2017-05-01 Thread Nicholas A. Bellinger
On Mon, 2017-05-01 at 13:40 -0500, Mike Christie wrote: > On 04/30/2017 06:29 AM, Xiubo Li wrote: > > [...] > >> To avoid starvation, I think you want a second list/fifo that holds the > >> watiers. In tcmu_get_empty_block if the list is not empty, record how > >> many pages we needed and then a

Re: [PATCH v6 0/2] tcmu: Dynamic growing data area support

2017-05-01 Thread Nicholas A. Bellinger
Hi Xiubo & Co, On Wed, 2017-04-26 at 14:25 +0800, lixi...@cmss.chinamobile.com wrote: > From: Xiubo Li > > Changed for V6: > - Remove the tcmu_vma_close(). Since the unmap thread will do the same for it > - The unmap thread will skip the busy devices. > - Using and testing the V5 version 3 week

Re: [PATCH 0/5] target: Fine-tuning for some function implementations

2017-05-01 Thread Nicholas A. Bellinger
Hi Markus, Apologies for the delayed follow-up here as well. On Sun, 2017-04-09 at 21:43 +0200, SF Markus Elfring wrote: > From: Markus Elfring > Date: Sun, 9 Apr 2017 21:33:21 +0200 > > A few update suggestions were taken into account > from static source code analysis. > > Markus Elfring (5)

[GIT PULL] target fixes for v4.11-rc7

2017-04-11 Thread Nicholas A. Bellinger
Hi Linus, Here are the outstanding target-pending bug-fixes for v4.11-rc7. Please go ahead and pull from: git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending.git master There has been work in a number of different areas over the last weeks, including: - Fix target-core-user (T

Re: [PATCH] tcmu: Skip Data-Out blocks before gathering Data-In buffer for BIDI case

2017-04-02 Thread Nicholas A. Bellinger
On Fri, 2017-03-31 at 10:35 +0800, lixi...@cmss.chinamobile.com wrote: > From: Xiubo Li > > For the bidirectional case, the Data-Out buffer blocks will always at > the head of the tcmu_cmd's bitmap, and before gathering the Data-In > buffer, first of all it should skip the Data-Out ones, or the d

Re: [PATCH 1/2] iscsi-target: Fix TMR reference leak during session shutdown

2017-04-02 Thread Nicholas A. Bellinger
On Thu, 2017-03-30 at 17:08 +, Bart Van Assche wrote: > On Thu, 2017-03-30 at 08:29 +0000, Nicholas A. Bellinger wrote: > > diff --git a/drivers/target/iscsi/iscsi_target_util.c > > b/drivers/target/iscsi/iscsi_target_util.c > > index 5041a9c..b464033 100644 > >

[PATCH] iscsi-target: Drop work-around for legacy GlobalSAN initiator

2017-04-02 Thread Nicholas A. Bellinger
From: Nicholas Bellinger Once upon a time back in 2009, a work-around was added to support the GlobalSAN iSCSI initiator v3.3 for MacOSX, which during login did not propose nor respond to MaxBurstLength, FirstBurstLength, DefaultTime2Wait and DefaultTime2Retain keys. The work-around in iscsi_che

Re: [PATCH 4.10 15/17] qla2xxx: Allow vref count to timeout on vport delete.

2017-03-31 Thread Nicholas A. Bellinger
Hi Joe + Himanshu, Thanks for backporting this patch to apply to v4.10.y. I haven't seen it queued to v4.9.y yet though, would you be so kind to send out a v4.9.y backport as well to Greg-KH + stable team so it can be picked up for earlier stable versions too..? Thank you, On Thu, 2017-03-30 at

[PATCH 2/2] target: Avoid mappedlun symlink creation during lun shutdown

2017-03-30 Thread Nicholas A. Bellinger
From: Nicholas Bellinger This patch closes a race between se_lun deletion during configfs unlink in target_fabric_port_unlink() -> core_dev_del_lun() -> core_tpg_remove_lun(), when transport_clear_lun_ref() blocks waiting for percpu_ref RCU grace period to finish, but a new NodeACL mappedlun is a

[PATCH 1/2] iscsi-target: Fix TMR reference leak during session shutdown

2017-03-30 Thread Nicholas A. Bellinger
From: Nicholas Bellinger This patch fixes a iscsi-target specific TMR reference leak during session shutdown, that could occur when a TMR was quiesced before the hand-off back to iscsi-target code via transport_cmd_check_stop_to_fabric(). The reference leak happens because iscsit_free_cmd() was

[PATCH 0/2] target: Bug-fixes for v4.11-rc

2017-03-30 Thread Nicholas A. Bellinger
From: Nicholas Bellinger Hi all, Here are two additional target bug-fixes that have been found by the DATERA Q/A + automation team during extended longevity and stress testing atop v4.1.y stable code. The first is a iscsi-target specific TMR reference leak during session shutdown when se_cmd qu

Re: [PATCH 24/29] drivers: convert iblock_req.pending from atomic_t to refcount_t

2017-03-21 Thread Nicholas A. Bellinger
Hi Elena, On Mon, 2017-03-06 at 16:21 +0200, Elena Reshetova wrote: > refcount_t type and corresponding API should be > used instead of atomic_t when the variable is used as > a reference counter. This allows to avoid accidental > refcounter overflows that might lead to use-after-free > situations

Re: [PATCH] usb: gadget: Correct usb EP argument for BOT status request

2017-03-21 Thread Nicholas A. Bellinger
Hi Manish, (Added target-devel CC') On Mon, 2017-03-20 at 15:05 +0530, Manish Narani wrote: > This patch corrects the argument in usb_ep_free_request as it is > mistakenly set to ep_out. It should be ep_in for status request. > > Signed-off-by: Manish Narani > --- > drivers/usb/gadget/function

Re: [GIT PULL] target fixes for v4.11-rc3

2017-03-18 Thread Nicholas A. Bellinger
On Sat, 2017-03-18 at 19:08 -0700, Nicholas A. Bellinger wrote: > Hello Linus, > > Here are the target-pending fixes for v4.11-rc3 code. Please go ahead > and pull from: > > git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending.git master > > The bulk of th

[GIT PULL] target fixes for v4.11-rc3

2017-03-18 Thread Nicholas A. Bellinger
Hello Linus, Here are the target-pending fixes for v4.11-rc3 code. Please go ahead and pull from: git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending.git master The bulk of the changes are in qla2xxx target driver code to address various issues found during Cavium/QLogic's intern

[PATCH] target; Drop pointless tfo->check_stop_free check

2017-03-08 Thread Nicholas A. Bellinger
From: Nicholas Bellinger All in-tree fabric drivers provide a tfo->check_stop_free(), so there is no need to do the extra check within existing transport_cmd_check_stop_to_fabric() code. Just to be sure, add a check in target_fabric_tf_ops_check() to notify any out-of-tree drivers that might be

Re: [PATCH 24/29] drivers: convert iblock_req.pending from atomic_t to refcount_t

2017-03-07 Thread Nicholas A. Bellinger
Hi Elena, On Mon, 2017-03-06 at 16:21 +0200, Elena Reshetova wrote: > refcount_t type and corresponding API should be > used instead of atomic_t when the variable is used as > a reference counter. This allows to avoid accidental > refcounter overflows that might lead to use-after-free > situations

[GIT PULL] target updates for v4.11-rc1

2017-03-02 Thread Nicholas A. Bellinger
Hello Linus, Here are the outstanding target pending changes for v4.11-rc1. Please go ahead and pull from: git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending.git for-next The highlights this round include: - Enable dual mode (initiator + target) qla2xxx operation. (Quinn + Hima

Re: [PATCH] target: Fix NULL dereference during LUN lookup + active I/O shutdown

2017-03-01 Thread Nicholas A. Bellinger
On Thu, 2017-02-23 at 11:46 -0600, Bryant G. Ly wrote: > > From: Nicholas Bellinger > > > > When transport_clear_lun_ref() is shutting down a se_lun via > > configfs with new I/O in-flight, it's possible to trigger a > > NULL pointer dereference in transport_lookup_cmd_lun() due > > to the fact pe

[PATCH] target: Fix NULL dereference during LUN lookup + active I/O shutdown

2017-02-22 Thread Nicholas A. Bellinger
From: Nicholas Bellinger When transport_clear_lun_ref() is shutting down a se_lun via configfs with new I/O in-flight, it's possible to trigger a NULL pointer dereference in transport_lookup_cmd_lun() due to the fact percpu_ref_get() doesn't do any __PERCPU_REF_DEAD checking before incrementing l

Re: [PATCH v3 4/9] vhost/scsi: Don't reinvent the wheel but use existing llist API

2017-02-18 Thread Nicholas A. Bellinger
Hi Byungchul, On Tue, 2017-02-14 at 16:26 +0900, Byungchul Park wrote: > Although llist provides proper APIs, they are not used. Make them used. > > Signed-off-by: Byungchul Park > --- > drivers/vhost/scsi.c | 11 +++ > 1 file changed, 3 insertions(+), 8 deletions(-) Acked-by: Nicholas

Re: [PATCH] uapi: fix linux/target_core_user.h userspace compilation errors

2017-02-18 Thread Nicholas A. Bellinger
Hi Dmitry, On Wed, 2017-02-15 at 23:04 +0300, Dmitry V. Levin wrote: > Consistently use types from linux/types.h to fix the following > linux/target_core_user.h userspace compilation errors: > > /usr/include/linux/target_core_user.h:108:4: error: unknown type name > 'uint32_t' > uint32_t iov

[GIT PULL] target fixes for v4.10

2017-02-09 Thread Nicholas A. Bellinger
Hello Linus, The following target series for v4.10 contains fixes which address a few long-standing bugs that DATERA's QA + automation teams have uncovered while putting v4.1.y target code into production usage. We've been running the top three in our nightly automated regression runs for the las

Re: [PATCH 1/5] target: Don't BUG_ON during NodeACL dynamic -> explicit conversion

2017-02-08 Thread Nicholas A. Bellinger
On Tue, 2017-02-07 at 14:44 -0800, Christoph Hellwig wrote: > On Tue, Feb 07, 2017 at 01:17:46PM +0000, Nicholas A. Bellinger wrote: > > + if (orig->se_lun_acl != NULL) { > > + pr_warn_ratelimited("Detected existing explicit" > > +

Re: [PATCH 4/5] target: Fix multi-session dynamic se_node_acl double free OOPs

2017-02-08 Thread Nicholas A. Bellinger
On Tue, 2017-02-07 at 19:46 -0800, Nicholas A. Bellinger wrote: > On Tue, 2017-02-07 at 15:12 -0800, Christoph Hellwig wrote: > > And the real patch after compile fixing it is here of course: > > > > Getting rid of the extra se_node_acl->acl_free_comp seems to make sens

Re: [PATCH 4/5] target: Fix multi-session dynamic se_node_acl double free OOPs

2017-02-07 Thread Nicholas A. Bellinger
On Tue, 2017-02-07 at 15:12 -0800, Christoph Hellwig wrote: > And the real patch after compile fixing it is here of course: > Getting rid of the extra se_node_acl->acl_free_comp seems to make sense here.. The only potential issue is if returning from configfs syscall rmdir /sys/kernel/config/tar

[PATCH 1/5] target: Don't BUG_ON during NodeACL dynamic -> explicit conversion

2017-02-07 Thread Nicholas A. Bellinger
From: Nicholas Bellinger After the v4.2+ RCU conversion to se_node_acl->lun_entry_hlist, a BUG_ON() was added in core_enable_device_list_for_node() to detect when the passed *lun does not match the existing orig->se_lun pointer reference. However, this scenario can occur happen when a dynamicall

[PATCH 2/5] target: Use correct SCSI status during EXTENDED_COPY exception

2017-02-07 Thread Nicholas A. Bellinger
From: Nicholas Bellinger This patch adds the missing target_complete_cmd() SCSI status parameter change in target_xcopy_do_work(), that was originally missing in commit 926317de33. It correctly propigates up the correct SCSI status during EXTENDED_COPY exception cases, instead of always using th

  1   2   3   4   5   6   7   8   9   >