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
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 > >

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) -

[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) -

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. > > > >

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. > > > >

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

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

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

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

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

2017-11-23 Thread Nicholas A. Bellinger
ode in iscsi_decode_text_input() Mike Christie (2): target: return SAM_STAT_TASK_SET_FULL for TCM_OUT_OF_RESOURCES tcmu: fix double se_cmd completion Nicholas Bellinger (6): target: Fix QUEUE_FULL + SCSI task attribute handling target: Fix caw_sem leak in transport_generic_request_failure target: Fix quiese dur

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

2017-11-23 Thread Nicholas A. Bellinger
ode in iscsi_decode_text_input() Mike Christie (2): target: return SAM_STAT_TASK_SET_FULL for TCM_OUT_OF_RESOURCES tcmu: fix double se_cmd completion Nicholas Bellinger (6): target: Fix QUEUE_FULL + SCSI task attribute handling target: Fix caw_sem leak in transport_generic_request_failure target: Fix quiese dur

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

2017-11-07 Thread Nicholas A. Bellinger
From: Nicholas Bellinger <n...@linux-iscsi.org> 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

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

2017-11-07 Thread Nicholas A. Bellinger
From: Nicholas Bellinger <n...@linux-iscsi.org> 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

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

2017-11-07 Thread Nicholas A. Bellinger
From: Nicholas Bellinger <n...@linux-iscsi.org> 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, prec

[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

[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() dur

[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

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

2017-11-07 Thread Nicholas A. Bellinger
From: Nicholas Bellinger <n...@linux-iscsi.org> 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_s

[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

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

2017-11-07 Thread Nicholas A. Bellinger
From: Nicholas Bellinger <n...@linux-iscsi.org> 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. T

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

2017-11-07 Thread Nicholas A. Bellinger
From: Nicholas Bellinger <n...@linux-iscsi.org> 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 addr

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

2017-11-07 Thread Nicholas A. Bellinger
From: Nicholas Bellinger <n...@linux-iscsi.org> 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 regr

[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 patc

[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

[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, tr

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

2017-08-12 Thread Nicholas A. Bellinger
regression (Justin Maggard + nab) Thank you, --nab Bryant G. Ly (1): tcmu: free old string on reconfig Nicholas Bellinger (3): qla2xxx: Fix incorrect tcm_qla2xxx_free_cmd use during TMR ABORT (v2) iscsi-target: Fix iscsi_np reset hung task during parallel delete target: Fix node_acl

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

2017-08-12 Thread Nicholas A. Bellinger
regression (Justin Maggard + nab) Thank you, --nab Bryant G. Ly (1): tcmu: free old string on reconfig Nicholas Bellinger (3): qla2xxx: Fix incorrect tcm_qla2xxx_free_cmd use during TMR ABORT (v2) iscsi-target: Fix iscsi_np reset hung task during parallel delete target: Fix node_acl

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

2017-08-06 Thread Nicholas A. Bellinger
From: Nicholas Bellinger <n...@linux-iscsi.org> 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

[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

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

2017-07-30 Thread Nicholas A. Bellinger
From: Nicholas Bellinger <n...@linux-iscsi.org> 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_complet

[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

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

2017-07-13 Thread Nicholas A. Bellinger
et: remove transport_complete target: fix SAM_STAT_BUSY/TASK_SET_FULL handling target: export lio pgr/alua support as device attr Nicholas Bellinger (12): target/iblock: Convert WRITE_SAME to blkdev_issue_zeroout target/configfs: Kill se_device->dev_link_magic target/configfs: Kill se_lun->lun_li

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

2017-07-13 Thread Nicholas A. Bellinger
et: remove transport_complete target: fix SAM_STAT_BUSY/TASK_SET_FULL handling target: export lio pgr/alua support as device attr Nicholas Bellinger (12): target/iblock: Convert WRITE_SAME to blkdev_issue_zeroout target/configfs: Kill se_device->dev_link_magic target/configfs: Kill se_lun->lun_li

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: 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 <n...@linux-iscsi.org> > > > > This patch re-introduces part of a long standing login workaround th

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
A. Bellinger wrote: > From: Nicholas Bellinger <n...@linux-iscsi.org> > > This patch re-introduces part of a long standing login workaround that > was recently dropped by: > > commit 1c99de981f30b3e7868b8d20ce5479fa1c0fea46 > Author: Nicholas Bellinger <n...@linux-is

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

2017-07-11 Thread Nicholas A. Bellinger
A. Bellinger wrote: > 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

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

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 <n...@linux-iscsi.org> This patch re-introduces part of a long standing login workaround that was recently dropped by: commit 1c99de981f30b3e7868b8d20ce5479fa1c0fea46 Author: Nicholas Bellinger <n...@linux-iscsi.org> Date: Sun Apr 2 13:36:4

[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

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: > >

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

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

2017-06-30 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

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

2017-06-30 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

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: [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

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

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

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?" >

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
refcount_t conversion in upstream. - Fix a iscsi-target corner case during explicit connection logout timeout failure. - Address last fallout in iscsi-target immediate data handling from v4.4 target-core now allowing control CDB payload underflow. Thank you, --nab Nicholas Bellinger (3

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

2017-06-24 Thread Nicholas A. Bellinger
refcount_t conversion in upstream. - Fix a iscsi-target corner case during explicit connection logout timeout failure. - Address last fallout in iscsi-target immediate data handling from v4.4 target-core now allowing control CDB payload underflow. Thank you, --nab Nicholas Bellinger (3

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] 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-09 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 TRANSFER

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

2017-06-09 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 TRANSFER

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 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 <n...@linux-iscsi.org> > > wrote: > > > > From: Nicholas Bellinger <n...@linux-iscsi.org> > > > >

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 <n...@linux-iscsi.org> > > This patch fixes a BUG() in iscsit_close_session() that could be > triggered when iscsit_logout_post_handler() execution from within &

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 +, Nicholas A. Bellinger wrote: > From: Nicholas Bellinger <n...@linux-iscsi.org> > > This patch fixes a se_cmd->cmd_kref underflow during CMD_T_ABORTED > when a fabric driver drops it's second

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 +, 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 > targe

[PATCH] configfs: Fix race between create_link and configfs_rmdir

2017-06-07 Thread Nicholas A. Bellinger
From: Nicholas Bellinger <n...@linux-iscsi.org> 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 ta

[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

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

2017-06-07 Thread Nicholas A. Bellinger
From: Nicholas Bellinger <n...@linux-iscsi.org> 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

[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

[PATCH 0/3] target: Add TARGET_SCF_LOOKUP_LUN_FROM_TAG support

2017-06-03 Thread Nicholas A. Bellinger
From: Nicholas Bellinger <n...@linux-iscsi.org> 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 look

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

2017-06-03 Thread Nicholas A. Bellinger
From: Nicholas Bellinger <n...@linux-iscsi.org> 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

[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_a

[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 d

[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 <n...@linux-iscsi.org> 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: Hi

[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 <n...@linux-iscsi.org> 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

[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

[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 subsequen

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

2017-06-03 Thread Nicholas A. Bellinger
From: Nicholas Bellinger <n...@linux-iscsi.org> 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

[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

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

2017-06-03 Thread Nicholas A. Bellinger
From: Nicholas Bellinger <n...@linux-iscsi.org> 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 r

[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

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: 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 one'

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 one'

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: >

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 <n...@linux-iscsi.org> 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 im

[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 expli

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

2017-06-01 Thread Nicholas A. Bellinger
From: Nicholas Bellinger <n...@linux-iscsi.org> 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 <h...@lst.de&

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

2017-06-01 Thread Nicholas A. Bellinger
From: Nicholas Bellinger <n...@linux-iscsi.org> 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 <h...@lst.de&

[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

[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

  1   2   3   4   5   6   7   8   9   10   >