RE: [PATCH 8/9] scsi: bfa: Use zeroing allocator rather than allocator/memset

2018-01-01 Thread Gurumurthy, Anil


-Original Message-
From: Himanshu Jha [mailto:himanshujha199...@gmail.com] 
Sent: 30 December 2017 20:59
To: j...@linux.vnet.ibm.com; martin.peter...@oracle.com; aacr...@adaptec.com
Cc: Gurumurthy, Anil <anil.gurumur...@cavium.com>; Kalluru, Sudarsana 
<sudarsana.kall...@cavium.com>; Dept-Eng QLogic Storage Upstream 
<qlogic-storage-upstr...@cavium.com>; satis...@cisco.com; sebad...@cisco.com; 
karti...@cisco.com; Dept-Eng QLogic Storage Upstream 
<qlogic-storage-upstr...@cavium.com>; Dept-Eng QLA2xxx Upstream 
<qla2xxx-upstr...@cavium.com>; linux-scsi@vger.kernel.org; 
linux-ker...@vger.kernel.org; Himanshu Jha <himanshujha199...@gmail.com>
Subject: [PATCH 8/9] scsi: bfa: Use zeroing allocator rather than 
allocator/memset

Use vzalloc instead of vmalloc followed by memset 0.

Generated-by: scripts/coccinelle/api/alloc/kzalloc-simple.cocci

Suggested-by: Luis R. Rodriguez <mcg...@kernel.org>
Signed-off-by: Himanshu Jha <himanshujha199...@gmail.com>
---
 drivers/scsi/bfa/bfad.c | 3 +--
 drivers/scsi/bfa/bfad_debugfs.c | 8 ++--
 2 files changed, 3 insertions(+), 8 deletions(-)

diff --git a/drivers/scsi/bfa/bfad.c b/drivers/scsi/bfa/bfad.c index 
bac18f6..bd7e6a6f 100644
--- a/drivers/scsi/bfa/bfad.c
+++ b/drivers/scsi/bfa/bfad.c
@@ -610,13 +610,12 @@ bfad_hal_mem_alloc(struct bfad_s *bfad)
/* Iterate through the KVA meminfo queue */
list_for_each(km_qe, _info->qe) {
kva_elem = (struct bfa_mem_kva_s *) km_qe;
-   kva_elem->kva = vmalloc(kva_elem->mem_len);
+   kva_elem->kva = vzalloc(kva_elem->mem_len);
if (kva_elem->kva == NULL) {
bfad_hal_mem_release(bfad);
rc = BFA_STATUS_ENOMEM;
goto ext;
}
-   memset(kva_elem->kva, 0, kva_elem->mem_len);
}
 
/* Iterate through the DMA meminfo queue */ diff --git 
a/drivers/scsi/bfa/bfad_debugfs.c b/drivers/scsi/bfa/bfad_debugfs.c index 
05f5239..349cfe7 100644
--- a/drivers/scsi/bfa/bfad_debugfs.c
+++ b/drivers/scsi/bfa/bfad_debugfs.c
@@ -81,7 +81,7 @@ bfad_debugfs_open_fwtrc(struct inode *inode, struct file 
*file)
 
fw_debug->buffer_len = sizeof(struct bfa_trc_mod_s);
 
-   fw_debug->debug_buffer = vmalloc(fw_debug->buffer_len);
+   fw_debug->debug_buffer = vzalloc(fw_debug->buffer_len);
if (!fw_debug->debug_buffer) {
kfree(fw_debug);
printk(KERN_INFO "bfad[%d]: Failed to allocate fwtrc buffer\n", 
@@ -89,8 +89,6 @@ bfad_debugfs_open_fwtrc(struct inode *inode, struct file 
*file)
return -ENOMEM;
}
 
-   memset(fw_debug->debug_buffer, 0, fw_debug->buffer_len);
-
spin_lock_irqsave(>bfad_lock, flags);
rc = bfa_ioc_debug_fwtrc(>bfa.ioc,
fw_debug->debug_buffer,
@@ -125,7 +123,7 @@ bfad_debugfs_open_fwsave(struct inode *inode, struct file 
*file)
 
fw_debug->buffer_len = sizeof(struct bfa_trc_mod_s);
 
-   fw_debug->debug_buffer = vmalloc(fw_debug->buffer_len);
+   fw_debug->debug_buffer = vzalloc(fw_debug->buffer_len);
if (!fw_debug->debug_buffer) {
kfree(fw_debug);
printk(KERN_INFO "bfad[%d]: Failed to allocate fwsave 
buffer\n", @@ -133,8 +131,6 @@ bfad_debugfs_open_fwsave(struct inode *inode, 
struct file *file)
return -ENOMEM;
}
 
-   memset(fw_debug->debug_buffer, 0, fw_debug->buffer_len);
-
spin_lock_irqsave(>bfad_lock, flags);
rc = bfa_ioc_debug_fwsave(>bfa.ioc,
fw_debug->debug_buffer,
--
2.7.4

Acked by: Anil Gurumurthy <anil.gurumur...@cavium.com>



RE: [PATCH] scsi: bfa: use setup_timer instead of init_timer

2017-11-26 Thread Gurumurthy, Anil

-Original Message-
From: Colin King [mailto:colin.k...@canonical.com] 
Sent: 24 November 2017 19:14
To: Gurumurthy, Anil <anil.gurumur...@cavium.com>; Kalluru, Sudarsana 
<sudarsana.kall...@cavium.com>; James E . J . Bottomley 
<j...@linux.vnet.ibm.com>; Martin K . Petersen <martin.peter...@oracle.com>; 
linux-scsi@vger.kernel.org
Cc: kernel-janit...@vger.kernel.org; linux-ker...@vger.kernel.org
Subject: [PATCH] scsi: bfa: use setup_timer instead of init_timer

From: Colin Ian King <colin.k...@canonical.com>

Use setup_timer function instead of initializing timer with the function and 
data fields.

Signed-off-by: Colin Ian King <colin.k...@canonical.com>
---
 drivers/scsi/bfa/bfad.c | 5 +
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/scsi/bfa/bfad.c b/drivers/scsi/bfa/bfad.c index 
5caf5f3ff642..c910b238bc9e 100644
--- a/drivers/scsi/bfa/bfad.c
+++ b/drivers/scsi/bfa/bfad.c
@@ -719,10 +719,7 @@ bfad_bfa_tmo(unsigned long data)  void  
bfad_init_timer(struct bfad_s *bfad)  {
-   init_timer(>hal_tmo);
-   bfad->hal_tmo.function = bfad_bfa_tmo;
-   bfad->hal_tmo.data = (unsigned long)bfad;
-
+   setup_timer(>hal_tmo, bfad_bfa_tmo, (unsigned long)bfad);
mod_timer(>hal_tmo,
  jiffies + msecs_to_jiffies(BFA_TIMER_FREQ));
 }
--
2.14.1
 
Acked-by: Anil Gurumurthy <anil.gurumur...@cavium.com>



RE: [PATCH 0/7] scsi: bfa: do_gettimeofday removal

2017-11-10 Thread Gurumurthy, Anil
The bfa drivers are in deep maintenance mode for some time now. We have not had 
issues reported on them for a while, but it would be good to continue to have 
them.

The series looks ok to me too.

Thanks,
Anil

-Original Message-
From: Christoph Hellwig [mailto:h...@lst.de] 
Sent: 10 November 2017 22:55
To: Arnd Bergmann <a...@arndb.de>
Cc: Gurumurthy, Anil <anil.gurumur...@cavium.com>; Kalluru, Sudarsana 
<sudarsana.kall...@cavium.com>; James E . J . Bottomley 
<j...@linux.vnet.ibm.com>; Martin K . Petersen <martin.peter...@oracle.com>; 
linux-scsi@vger.kernel.org; linux-ker...@vger.kernel.org; 
y2...@lists.linaro.org; h...@lst.de; h...@suse.com; jthumsh...@suse.de
Subject: Re: [PATCH 0/7] scsi: bfa: do_gettimeofday removal

This stuff look ok - but I have a bigger question and that is if bfa is still 
alive at all.  Everytime I look at it I have doubts if it works at all, so I 
wonder if we need to keep it on life support.


RE: [PATCH] bfa: turn bfa_mem_{kva,dma}_setup into inline functions

2016-11-20 Thread Gurumurthy, Anil
Patch looks good.
Acked by: Anil Gurumurthy 


-Original Message-
From: Johannes Thumshirn [mailto:jthumsh...@suse.de] 
Sent: 18 November 2016 18:52
To: Arnd Bergmann 
Cc: James E.J. Bottomley ; Martin K. Petersen 
; Anil Gurumurthy ; 
Sudarsana Kalluru ; linux-scsi@vger.kernel.org; 
linux-ker...@vger.kernel.org
Subject: Re: [PATCH] bfa: turn bfa_mem_{kva,dma}_setup into inline functions

On Wed, Nov 16, 2016 at 04:14:27PM +0100, Arnd Bergmann wrote:
> These two macros cause lots of warnings with gcc-7:
> 
> drivers/scsi/bfa/bfa_svc.c: In function 'bfa_fcxp_meminfo':
> drivers/scsi/bfa/bfa_svc.c:521:103: error: '*' in boolean context, 
> suggest '&&' instead [-Werror=int-in-bool-context]
> 
> Using inline functions makes them much more readable and avoids the 
> warnings.
> 
> Signed-off-by: Arnd Bergmann 
> ---

Looks good,
Reviewed-by: Johannes Thumshirn 

-- 
Johannes Thumshirn  Storage
jthumsh...@suse.de+49 911 74053 689
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: Felix Imendörffer, Jane Smithard, Graham Norton HRB 21284 (AG Nürnberg) Key 
fingerprint = EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76 0850
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


RE: Crash in TCM-LIO

2016-10-26 Thread Gurumurthy, Anil
Hello Nicholas,

-Original Message-
From: Nicholas A. Bellinger [mailto:n...@linux-iscsi.org] 
Sent: 26 October 2016 11:49
To: Gurumurthy, Anil <anil.gurumur...@cavium.com>
Cc: Anil Gurumurthy <anil.gurumur...@qlogic.com>; linux-scsi 
<linux-scsi@vger.kernel.org>; Malavali, Giridhar 
<giridhar.malav...@cavium.com>; Tran, Quinn <quinn.t...@cavium.com>; TomK 
<t...@mdevsys.com>
Subject: Re: Crash in TCM-LIO

Hello Anil & Co,

On Tue, 2016-10-25 at 05:33 +, Gurumurthy, Anil wrote:
> On Mon, 2016-10-24 at 06:36 +, Anil Gurumurthy wrote:



> > 
> > [71884.588748] BUG: unable to handle kernel NULL pointer dereference 
> > at 00e0
> > 
> > [71884.51] IP: [] kmem_cache_free+0x11a/0x200
> > 
> > [71884.588981] PGD 0
> > 
> > [71884.589017] Oops:  [#1] SMP
> > 
> > [71884.589041] [ cut here ]
> > 
> > [71884.589048] WARNING: CPU: 2 PID: 20783 at lib/list_debug.c:62
> > __list_del_entry+0x86/0xd0
> > 
> > [71884.589049] list_del corruption. next->prev should be 
> > 8806f8daeb68, but was 8806f8db79e8
> > 
> > [71884.589075] Modules linked in: target_core_pscsi tcm_qla2xxx(OE)
> > qla2xxx(OE) iscsi_target_mod target_core_file target_core_iblock 
> > target_core_mod netconsole ebtable_nat ebtables ipt_MASQUERADE
> > nf_nat_masquerade_ipv4 iptable_nat nf_nat_ipv4 nf_nat xt_CHECKSUM 
> > iptable_mangle bridge 8021q mrp garp stp llc ipt_REJECT 
> > nf_reject_ipv4
> > nf_conntrack_ipv4 nf_defrag_ipv4 iptable_filter ip_tables 
> > ip6t_REJECT
> > nf_reject_ipv6 nf_conntrack_ipv6 nf_defrag_ipv6 xt_state 
> > nf_conntrack ip6table_filter ip6_tables binfmt_misc vhost_net 
> > macvtap macvlan vhost tun uinput sg serio_raw iTCO_wdt 
> > iTCO_vendor_support ipmi_ssif ipmi_si ipmi_msghandler hpilo hpwdt 
> > bnx2 intel_powerclamp coretemp kvm_intel kvm irqbypass 
> > crct10dif_pclmul crc32_pclmul crc32c_intel ghash_clmulni_intel 
> > pcspkr acpi_power_meter lpc_ich mfd_core i7core_edac edac_core 
> > shpchp ext4(E) mbcache(E) jbd2(E) sd_mod(E)
> > sr_mod(E) cdrom(E) scsi_transport_fc(E) hpsa(E) 
> > scsi_transport_sas(E)
> > aesni_intel(E) ablk_helper(E) cryptd(E) lrw(E) gf128mul(E)
> > glue_helper(E) pata_acpi(E) ata_generic(E) ata_piix(E) libata(E)
> > radeon(E) ttm(E) drm_kms_helper(E) drm(E) fb_sys_fops(E) 
> > sysimgblt(E)
> > sysfillrect(E) syscopyarea(E) i2c_algo_bit(E) i2c_core(E) 
> > dm_mirror(E)
> > dm_region_hash(E) dm_log(E) dm_mod(E) [last unloaded: qla2xxx]
> > 
> > [71884.589091] CPU: 2 PID: 20783 Comm: kworker/2:0 Tainted: GW
> > IOE   4.7.0-rc1+ #2
> > 
> > [71884.589092] Hardware name: HP ProLiant DL380 G7, BIOS P67
> > 05/05/2011
> > 
> > [71884.589107] Workqueue: target_completion target_complete_ok_work 
> > [target_core_mod]
> > 
> > [71884.589109]   880408d1fae8 81352197
> > 81370ef6
> > 
> > [71884.589110]  880408d1fb48 880408d1fb48 
> > 880408d1fb38
> > 
> > [71884.589111]  8108a12d 07c3 003e0246
> > 0246
> > 
> > [71884.589112] Call Trace:
> > 
> > [71884.589115]  [] dump_stack+0x67/0x90
> > 
> > [71884.589117]  [] ? __list_del_entry+0x86/0xd0
> > 
> > [71884.589119]  [] __warn+0xfd/0x120
> > 
> > [71884.589120]  [] warn_slowpath_fmt+0x49/0x50
> > 
> > [71884.589122]  [] __list_del_entry+0x86/0xd0
> > 
> > [71884.589123]  [] list_del+0x11/0x40
> > 
> > [71884.589132]  [] target_remove_from_state_list
> > +0x6e/0x80 [target_core_mod]
> > 
> > [71884.589140]  [] transport_cmd_check_stop
> > +0xe4/0x120 [target_core_mod]
> > 
> > [71884.589151]  []
> > transport_cmd_check_stop_to_fabric+0x15/0x20 [target_core_mod]
> > 
> > [71884.589160]  [] target_complete_ok_work
> > +0x14e/0x280 [target_core_mod]
> > 
> > [71884.589162]  [] ? 
> > pwq_dec_nr_in_flight+0x50/0xa0
> > 
> > [71884.589164]  [] process_one_work+0x183/0x4d0
> > 
> > [71884.589166]  [] ? __schedule+0x1ff/0x5c0
> > 
> > [71884.589167]  [] ? schedule+0x40/0xb0
> > 
> > [71884.589169]  [] worker_thread+0x16d/0x530
> > 
> > [71884.589171]  [] ? __switch_to+0x1cd/0x5e0
> > 
> > [71884.589173]  [] ? __schedule+0x1ff/0x5c0
> > 
> > [71884.589175]  [] ? __wake_up_common+0x56/0x90
> > 
> > [71884.589177]  [] ? 
> > maybe_create_worker+0x120/0x120
> > 
> > [71884.589178]  [] ? schedule+0x4

RE: Crash in TCM-LIO

2016-10-25 Thread Gurumurthy, Anil
Hello Nicholas,

-Original Message-
From: Gurumurthy, Anil 
Sent: 24 October 2016 14:50
To: 'Nicholas A. Bellinger' <n...@linux-iscsi.org>; Anil Gurumurthy 
<anil.gurumur...@qlogic.com>
Cc: linux-scsi <linux-scsi@vger.kernel.org>; Malavali, Giridhar 
<giridhar.malav...@cavium.com>; Tran, Quinn <quinn.t...@cavium.com>; TomK 
<t...@mdevsys.com>
Subject: RE: Crash in TCM-LIO



-Original Message-
From: Nicholas A. Bellinger [mailto:n...@linux-iscsi.org]
Sent: 24 October 2016 12:30
To: Anil Gurumurthy <anil.gurumur...@qlogic.com>
Cc: linux-scsi <linux-scsi@vger.kernel.org>; Malavali, Giridhar 
<giridhar.malav...@cavium.com>; Tran, Quinn <quinn.t...@cavium.com>; TomK 
<t...@mdevsys.com>
Subject: Re: Crash in TCM-LIO

Hello Anil & Co,

On Mon, 2016-10-24 at 06:36 +, Anil Gurumurthy wrote:
> Hello Nicholas,
> 
>   I was trying to get DIF working on TCM-LIO with a QLogic FC adapter 
> on kernel version 4.7. I noticed a crash when there was an abort 
> received by the target with the following stack trace:
> 
>  

Thanks for reporting.

> 
> [71884.588748] BUG: unable to handle kernel NULL pointer dereference 
> at 00e0
> 
> [71884.51] IP: [] kmem_cache_free+0x11a/0x200
> 
> [71884.588981] PGD 0
> 
> [71884.589017] Oops:  [#1] SMP
> 
> [71884.589041] [ cut here ]
> 
> [71884.589048] WARNING: CPU: 2 PID: 20783 at lib/list_debug.c:62
> __list_del_entry+0x86/0xd0
> 
> [71884.589049] list_del corruption. next->prev should be 
> 8806f8daeb68, but was 8806f8db79e8
> 
> [71884.589075] Modules linked in: target_core_pscsi tcm_qla2xxx(OE)
> qla2xxx(OE) iscsi_target_mod target_core_file target_core_iblock 
> target_core_mod netconsole ebtable_nat ebtables ipt_MASQUERADE
> nf_nat_masquerade_ipv4 iptable_nat nf_nat_ipv4 nf_nat xt_CHECKSUM 
> iptable_mangle bridge 8021q mrp garp stp llc ipt_REJECT nf_reject_ipv4
> nf_conntrack_ipv4 nf_defrag_ipv4 iptable_filter ip_tables ip6t_REJECT
> nf_reject_ipv6 nf_conntrack_ipv6 nf_defrag_ipv6 xt_state nf_conntrack 
> ip6table_filter ip6_tables binfmt_misc vhost_net macvtap macvlan vhost 
> tun uinput sg serio_raw iTCO_wdt iTCO_vendor_support ipmi_ssif ipmi_si 
> ipmi_msghandler hpilo hpwdt bnx2 intel_powerclamp coretemp kvm_intel 
> kvm irqbypass crct10dif_pclmul crc32_pclmul crc32c_intel 
> ghash_clmulni_intel pcspkr acpi_power_meter lpc_ich mfd_core 
> i7core_edac edac_core shpchp ext4(E) mbcache(E) jbd2(E) sd_mod(E)
> sr_mod(E) cdrom(E) scsi_transport_fc(E) hpsa(E) scsi_transport_sas(E)
> aesni_intel(E) ablk_helper(E) cryptd(E) lrw(E) gf128mul(E)
> glue_helper(E) pata_acpi(E) ata_generic(E) ata_piix(E) libata(E)
> radeon(E) ttm(E) drm_kms_helper(E) drm(E) fb_sys_fops(E) sysimgblt(E)
> sysfillrect(E) syscopyarea(E) i2c_algo_bit(E) i2c_core(E) dm_mirror(E)
> dm_region_hash(E) dm_log(E) dm_mod(E) [last unloaded: qla2xxx]
> 
> [71884.589091] CPU: 2 PID: 20783 Comm: kworker/2:0 Tainted: GW
> IOE   4.7.0-rc1+ #2
> 
> [71884.589092] Hardware name: HP ProLiant DL380 G7, BIOS P67
> 05/05/2011
> 
> [71884.589107] Workqueue: target_completion target_complete_ok_work 
> [target_core_mod]
> 
> [71884.589109]   880408d1fae8 81352197
> 81370ef6
> 
> [71884.589110]  880408d1fb48 880408d1fb48 
> 880408d1fb38
> 
> [71884.589111]  8108a12d 07c3 003e0246
> 0246
> 
> [71884.589112] Call Trace:
> 
> [71884.589115]  [] dump_stack+0x67/0x90
> 
> [71884.589117]  [] ? __list_del_entry+0x86/0xd0
> 
> [71884.589119]  [] __warn+0xfd/0x120
> 
> [71884.589120]  [] warn_slowpath_fmt+0x49/0x50
> 
> [71884.589122]  [] __list_del_entry+0x86/0xd0
> 
> [71884.589123]  [] list_del+0x11/0x40
> 
> [71884.589132]  [] target_remove_from_state_list
> +0x6e/0x80 [target_core_mod]
> 
> [71884.589140]  [] transport_cmd_check_stop
> +0xe4/0x120 [target_core_mod]
> 
> [71884.589151]  []
> transport_cmd_check_stop_to_fabric+0x15/0x20 [target_core_mod]
> 
> [71884.589160]  [] target_complete_ok_work
> +0x14e/0x280 [target_core_mod]
> 
> [71884.589162]  [] ? pwq_dec_nr_in_flight+0x50/0xa0
> 
> [71884.589164]  [] process_one_work+0x183/0x4d0
> 
> [71884.589166]  [] ? __schedule+0x1ff/0x5c0
> 
> [71884.589167]  [] ? schedule+0x40/0xb0
> 
> [71884.589169]  [] worker_thread+0x16d/0x530
> 
> [71884.589171]  [] ? __switch_to+0x1cd/0x5e0
> 
> [71884.589173]  [] ? __schedule+0x1ff/0x5c0
> 
> [71884.589175]  [] ? __wake_up_common+0x56/0x90
> 
> [71884.589177]  [] ? maybe_create_worker+0x120/0x120
> 
> [71884.589178]  [] ? schedule+0x40/0xb0
> 
> [71884.58

RE: Crash in TCM-LIO

2016-10-24 Thread Gurumurthy, Anil


-Original Message-
From: Nicholas A. Bellinger [mailto:n...@linux-iscsi.org] 
Sent: 24 October 2016 12:30
To: Anil Gurumurthy 
Cc: linux-scsi ; Malavali, Giridhar 
; Tran, Quinn ; TomK 

Subject: Re: Crash in TCM-LIO

Hello Anil & Co,

On Mon, 2016-10-24 at 06:36 +, Anil Gurumurthy wrote:
> Hello Nicholas,
> 
>   I was trying to get DIF working on TCM-LIO with a QLogic FC adapter 
> on kernel version 4.7. I noticed a crash when there was an abort 
> received by the target with the following stack trace:
> 
>  

Thanks for reporting.

> 
> [71884.588748] BUG: unable to handle kernel NULL pointer dereference 
> at 00e0
> 
> [71884.51] IP: [] kmem_cache_free+0x11a/0x200
> 
> [71884.588981] PGD 0
> 
> [71884.589017] Oops:  [#1] SMP
> 
> [71884.589041] [ cut here ]
> 
> [71884.589048] WARNING: CPU: 2 PID: 20783 at lib/list_debug.c:62
> __list_del_entry+0x86/0xd0
> 
> [71884.589049] list_del corruption. next->prev should be 
> 8806f8daeb68, but was 8806f8db79e8
> 
> [71884.589075] Modules linked in: target_core_pscsi tcm_qla2xxx(OE)
> qla2xxx(OE) iscsi_target_mod target_core_file target_core_iblock 
> target_core_mod netconsole ebtable_nat ebtables ipt_MASQUERADE
> nf_nat_masquerade_ipv4 iptable_nat nf_nat_ipv4 nf_nat xt_CHECKSUM 
> iptable_mangle bridge 8021q mrp garp stp llc ipt_REJECT nf_reject_ipv4
> nf_conntrack_ipv4 nf_defrag_ipv4 iptable_filter ip_tables ip6t_REJECT
> nf_reject_ipv6 nf_conntrack_ipv6 nf_defrag_ipv6 xt_state nf_conntrack 
> ip6table_filter ip6_tables binfmt_misc vhost_net macvtap macvlan vhost 
> tun uinput sg serio_raw iTCO_wdt iTCO_vendor_support ipmi_ssif ipmi_si 
> ipmi_msghandler hpilo hpwdt bnx2 intel_powerclamp coretemp kvm_intel 
> kvm irqbypass crct10dif_pclmul crc32_pclmul crc32c_intel 
> ghash_clmulni_intel pcspkr acpi_power_meter lpc_ich mfd_core 
> i7core_edac edac_core shpchp ext4(E) mbcache(E) jbd2(E) sd_mod(E)
> sr_mod(E) cdrom(E) scsi_transport_fc(E) hpsa(E) scsi_transport_sas(E)
> aesni_intel(E) ablk_helper(E) cryptd(E) lrw(E) gf128mul(E)
> glue_helper(E) pata_acpi(E) ata_generic(E) ata_piix(E) libata(E)
> radeon(E) ttm(E) drm_kms_helper(E) drm(E) fb_sys_fops(E) sysimgblt(E)
> sysfillrect(E) syscopyarea(E) i2c_algo_bit(E) i2c_core(E) dm_mirror(E)
> dm_region_hash(E) dm_log(E) dm_mod(E) [last unloaded: qla2xxx]
> 
> [71884.589091] CPU: 2 PID: 20783 Comm: kworker/2:0 Tainted: GW
> IOE   4.7.0-rc1+ #2
> 
> [71884.589092] Hardware name: HP ProLiant DL380 G7, BIOS P67
> 05/05/2011
> 
> [71884.589107] Workqueue: target_completion target_complete_ok_work 
> [target_core_mod]
> 
> [71884.589109]   880408d1fae8 81352197
> 81370ef6
> 
> [71884.589110]  880408d1fb48 880408d1fb48 
> 880408d1fb38
> 
> [71884.589111]  8108a12d 07c3 003e0246
> 0246
> 
> [71884.589112] Call Trace:
> 
> [71884.589115]  [] dump_stack+0x67/0x90
> 
> [71884.589117]  [] ? __list_del_entry+0x86/0xd0
> 
> [71884.589119]  [] __warn+0xfd/0x120
> 
> [71884.589120]  [] warn_slowpath_fmt+0x49/0x50
> 
> [71884.589122]  [] __list_del_entry+0x86/0xd0
> 
> [71884.589123]  [] list_del+0x11/0x40
> 
> [71884.589132]  [] target_remove_from_state_list
> +0x6e/0x80 [target_core_mod]
> 
> [71884.589140]  [] transport_cmd_check_stop
> +0xe4/0x120 [target_core_mod]
> 
> [71884.589151]  []
> transport_cmd_check_stop_to_fabric+0x15/0x20 [target_core_mod]
> 
> [71884.589160]  [] target_complete_ok_work
> +0x14e/0x280 [target_core_mod]
> 
> [71884.589162]  [] ? pwq_dec_nr_in_flight+0x50/0xa0
> 
> [71884.589164]  [] process_one_work+0x183/0x4d0
> 
> [71884.589166]  [] ? __schedule+0x1ff/0x5c0
> 
> [71884.589167]  [] ? schedule+0x40/0xb0
> 
> [71884.589169]  [] worker_thread+0x16d/0x530
> 
> [71884.589171]  [] ? __switch_to+0x1cd/0x5e0
> 
> [71884.589173]  [] ? __schedule+0x1ff/0x5c0
> 
> [71884.589175]  [] ? __wake_up_common+0x56/0x90
> 
> [71884.589177]  [] ? maybe_create_worker+0x120/0x120
> 
> [71884.589178]  [] ? schedule+0x40/0xb0
> 
> [71884.589179]  [] ? maybe_create_worker+0x120/0x120
> 
> [71884.589180]  [] kthread+0xcc/0xf0
> 
> [71884.589183]  [] ? do_syscall_64+0x78/0x1d0
> 
> [71884.589185]  [] ? schedule_tail+0x1e/0xc0
> 
> [71884.589188]  [] ret_from_fork+0x1f/0x40
> 
> [71884.589189]  [] ? kthread_freezable_should_stop
> +0x70/0x70
> 
> [71884.589190] ---[ end trace 7f24d6c863b6e35b ]---
> 
> [71884.589204] [ cut here ]
> 
> [71884.589206] WARNING: CPU: 2 PID: 20783 at lib/list_debug.c:59
> __list_del_entry+0xa5/0xd0
> 
>  

Was list corruption preceded by hung kernel task warnings..?

No. The only messages prior to them were similar to this:
[ 3345.864359] ABORT_TASK: Sending TMR_TASK_DOES_NOT_EXIST for ref_tag: 1219168 
[ 3345.864378] qla2xxx [:0b:00.1]-e900:4: RESET-TMR 

RE: Crash in TCM-LIO

2016-10-24 Thread Gurumurthy, Anil


-Original Message-
From: Nicholas A. Bellinger [mailto:n...@linux-iscsi.org] 
Sent: 24 October 2016 12:30
To: Anil Gurumurthy 
Cc: linux-scsi ; Malavali, Giridhar 
; Tran, Quinn ; TomK 

Subject: Re: Crash in TCM-LIO

Hello Anil & Co,

On Mon, 2016-10-24 at 06:36 +, Anil Gurumurthy wrote:
> Hello Nicholas,
> 
>   I was trying to get DIF working on TCM-LIO with a QLogic FC adapter 
> on kernel version 4.7. I noticed a crash when there was an abort 
> received by the target with the following stack trace:
> 
>  

Thanks for reporting.

> 
> [71884.588748] BUG: unable to handle kernel NULL pointer dereference 
> at 00e0
> 
> [71884.51] IP: [] kmem_cache_free+0x11a/0x200
> 
> [71884.588981] PGD 0
> 
> [71884.589017] Oops:  [#1] SMP
> 
> [71884.589041] [ cut here ]
> 
> [71884.589048] WARNING: CPU: 2 PID: 20783 at lib/list_debug.c:62
> __list_del_entry+0x86/0xd0
> 
> [71884.589049] list_del corruption. next->prev should be 
> 8806f8daeb68, but was 8806f8db79e8
> 
> [71884.589075] Modules linked in: target_core_pscsi tcm_qla2xxx(OE)
> qla2xxx(OE) iscsi_target_mod target_core_file target_core_iblock 
> target_core_mod netconsole ebtable_nat ebtables ipt_MASQUERADE
> nf_nat_masquerade_ipv4 iptable_nat nf_nat_ipv4 nf_nat xt_CHECKSUM 
> iptable_mangle bridge 8021q mrp garp stp llc ipt_REJECT nf_reject_ipv4
> nf_conntrack_ipv4 nf_defrag_ipv4 iptable_filter ip_tables ip6t_REJECT
> nf_reject_ipv6 nf_conntrack_ipv6 nf_defrag_ipv6 xt_state nf_conntrack 
> ip6table_filter ip6_tables binfmt_misc vhost_net macvtap macvlan vhost 
> tun uinput sg serio_raw iTCO_wdt iTCO_vendor_support ipmi_ssif ipmi_si 
> ipmi_msghandler hpilo hpwdt bnx2 intel_powerclamp coretemp kvm_intel 
> kvm irqbypass crct10dif_pclmul crc32_pclmul crc32c_intel 
> ghash_clmulni_intel pcspkr acpi_power_meter lpc_ich mfd_core 
> i7core_edac edac_core shpchp ext4(E) mbcache(E) jbd2(E) sd_mod(E)
> sr_mod(E) cdrom(E) scsi_transport_fc(E) hpsa(E) scsi_transport_sas(E)
> aesni_intel(E) ablk_helper(E) cryptd(E) lrw(E) gf128mul(E)
> glue_helper(E) pata_acpi(E) ata_generic(E) ata_piix(E) libata(E)
> radeon(E) ttm(E) drm_kms_helper(E) drm(E) fb_sys_fops(E) sysimgblt(E)
> sysfillrect(E) syscopyarea(E) i2c_algo_bit(E) i2c_core(E) dm_mirror(E)
> dm_region_hash(E) dm_log(E) dm_mod(E) [last unloaded: qla2xxx]
> 
> [71884.589091] CPU: 2 PID: 20783 Comm: kworker/2:0 Tainted: GW
> IOE   4.7.0-rc1+ #2
> 
> [71884.589092] Hardware name: HP ProLiant DL380 G7, BIOS P67
> 05/05/2011
> 
> [71884.589107] Workqueue: target_completion target_complete_ok_work 
> [target_core_mod]
> 
> [71884.589109]   880408d1fae8 81352197
> 81370ef6
> 
> [71884.589110]  880408d1fb48 880408d1fb48 
> 880408d1fb38
> 
> [71884.589111]  8108a12d 07c3 003e0246
> 0246
> 
> [71884.589112] Call Trace:
> 
> [71884.589115]  [] dump_stack+0x67/0x90
> 
> [71884.589117]  [] ? __list_del_entry+0x86/0xd0
> 
> [71884.589119]  [] __warn+0xfd/0x120
> 
> [71884.589120]  [] warn_slowpath_fmt+0x49/0x50
> 
> [71884.589122]  [] __list_del_entry+0x86/0xd0
> 
> [71884.589123]  [] list_del+0x11/0x40
> 
> [71884.589132]  [] target_remove_from_state_list
> +0x6e/0x80 [target_core_mod]
> 
> [71884.589140]  [] transport_cmd_check_stop
> +0xe4/0x120 [target_core_mod]
> 
> [71884.589151]  []
> transport_cmd_check_stop_to_fabric+0x15/0x20 [target_core_mod]
> 
> [71884.589160]  [] target_complete_ok_work
> +0x14e/0x280 [target_core_mod]
> 
> [71884.589162]  [] ? pwq_dec_nr_in_flight+0x50/0xa0
> 
> [71884.589164]  [] process_one_work+0x183/0x4d0
> 
> [71884.589166]  [] ? __schedule+0x1ff/0x5c0
> 
> [71884.589167]  [] ? schedule+0x40/0xb0
> 
> [71884.589169]  [] worker_thread+0x16d/0x530
> 
> [71884.589171]  [] ? __switch_to+0x1cd/0x5e0
> 
> [71884.589173]  [] ? __schedule+0x1ff/0x5c0
> 
> [71884.589175]  [] ? __wake_up_common+0x56/0x90
> 
> [71884.589177]  [] ? maybe_create_worker+0x120/0x120
> 
> [71884.589178]  [] ? schedule+0x40/0xb0
> 
> [71884.589179]  [] ? maybe_create_worker+0x120/0x120
> 
> [71884.589180]  [] kthread+0xcc/0xf0
> 
> [71884.589183]  [] ? do_syscall_64+0x78/0x1d0
> 
> [71884.589185]  [] ? schedule_tail+0x1e/0xc0
> 
> [71884.589188]  [] ret_from_fork+0x1f/0x40
> 
> [71884.589189]  [] ? kthread_freezable_should_stop
> +0x70/0x70
> 
> [71884.589190] ---[ end trace 7f24d6c863b6e35b ]---
> 
> [71884.589204] [ cut here ]
> 
> [71884.589206] WARNING: CPU: 2 PID: 20783 at lib/list_debug.c:59
> __list_del_entry+0xa5/0xd0
> 
>  

Was list corruption preceded by hung kernel task warnings..?

No. The only messages prior to them were similar to this:
[ 3345.864359] ABORT_TASK: Sending TMR_TASK_DOES_NOT_EXIST for ref_tag: 1219168
[ 3345.864378] qla2xxx [:0b:00.1]-e900:4: RESET-TMR